first commit
This commit is contained in:
+28
@@ -0,0 +1,28 @@
|
||||
# Compiled class file
|
||||
*.class
|
||||
*.iml
|
||||
*.idea
|
||||
target/
|
||||
|
||||
# Log file
|
||||
*.log
|
||||
|
||||
# BlueJ files
|
||||
*.ctxt
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
*.war
|
||||
*.ear
|
||||
*.zip
|
||||
*.tar.gz
|
||||
*.rar
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
|
||||
src/main/resources/application.yaml
|
||||
src/main/resources/application-dev.yaml
|
||||
@@ -0,0 +1,3 @@
|
||||
**/wangEditor/*.js
|
||||
**/nprogress/*.js
|
||||
**/assets/platform/plugins/**
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"printWidth": 150,
|
||||
"singleQuote": false,
|
||||
"tabWidth": 4,
|
||||
"semi": false,
|
||||
"trailingComma": "none",
|
||||
"bracketSpacing": true,
|
||||
"arrowParens": "always",
|
||||
"rangeStart": 0,
|
||||
"htmlWhitespaceSensitivity": "ignore",
|
||||
"vueIndentScriptAndStyle": false,
|
||||
"endOfLine": "auto",
|
||||
"useTabs": false
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
FROM openjdk:11.0.13-jdk
|
||||
COPY ./target/mini.jar /app/
|
||||
COPY ./target/classes/application.yaml /app/
|
||||
ENV TZ Asia/Shanghai
|
||||
|
||||
WORKDIR /app
|
||||
CMD ["java","-jar","-Dnutz.boot.configure.yaml.dir=/app","/app/mini.jar"]
|
||||
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright {yyyy} {name of copyright owner}
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -0,0 +1,525 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<packaging>jar</packaging>
|
||||
<groupId>com.budwk</groupId>
|
||||
<artifactId>zhgh_njupt</artifactId>
|
||||
<version>5.6.0-plus</version>
|
||||
|
||||
<properties>
|
||||
<nutzboot.version>2.6.0-SNAPSHOT</nutzboot.version>
|
||||
<nutz.version>1.r.70-SNAPSHOT</nutz.version>
|
||||
<mysql-connector-java.version>8.0.28</mysql-connector-java.version>
|
||||
<jaxb-api.version>2.3.1</jaxb-api.version>
|
||||
<slf4j.version>2.0.8</slf4j.version>
|
||||
<logback.version>1.5.8</logback.version>
|
||||
<sa-token.version>1.25.0</sa-token.version>
|
||||
<easy-captcha.version>1.6.2</easy-captcha.version>
|
||||
<commons-lang3.version>3.8.1</commons-lang3.version>
|
||||
<emoji-java.veision>4.0.0</emoji-java.veision>
|
||||
<jsoup.veision>1.15.3</jsoup.veision>
|
||||
<pinyin4j.veision>2.5.1</pinyin4j.veision>
|
||||
<poi.version>4.1.2</poi.version>
|
||||
<tencentcloud-sdk-java.version>4.0.11</tencentcloud-sdk-java.version>
|
||||
<poitl.version>1.12.2</poitl.version>
|
||||
<easypoi.version>4.5.0</easypoi.version>
|
||||
<lombok.version>1.18.34</lombok.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.axis</groupId>
|
||||
<artifactId>axis</artifactId>
|
||||
<version>1.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.axis</groupId>
|
||||
<artifactId>axis-ant</artifactId>
|
||||
<version>1.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.xml</groupId>
|
||||
<artifactId>jaxrpc</artifactId>
|
||||
<version>1.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.xml.soap</groupId>
|
||||
<artifactId>javax.xml.soap-api</artifactId>
|
||||
<version>1.4.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-discovery</groupId>
|
||||
<artifactId>commons-discovery</artifactId>
|
||||
<version>0.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>wsdl4j</groupId>
|
||||
<artifactId>wsdl4j</artifactId>
|
||||
<version>1.6.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.antherd</groupId>
|
||||
<artifactId>sm-crypto</artifactId>
|
||||
<version>0.3.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.googlecode.aviator</groupId>
|
||||
<artifactId>aviator</artifactId>
|
||||
<version>5.3.3</version>
|
||||
</dependency>
|
||||
|
||||
<!--minio文件sdk-->
|
||||
<dependency>
|
||||
<groupId>io.minio</groupId>
|
||||
<artifactId>minio</artifactId>
|
||||
<version>8.2.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.activation</groupId>
|
||||
<artifactId>activation</artifactId>
|
||||
<version>1.1.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.pdfbox</groupId>
|
||||
<artifactId>pdfbox</artifactId>
|
||||
<version>3.0.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>easyexcel</artifactId>
|
||||
<version>4.0.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.tencentcloudapi</groupId>
|
||||
<artifactId>tencentcloud-sdk-java</artifactId>
|
||||
<version>${tencentcloud-sdk-java.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.squareup.okio</groupId>
|
||||
<artifactId>okio</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>${lombok.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.nutz</groupId>
|
||||
<artifactId>nutzboot-core</artifactId>
|
||||
<version>${nutzboot.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.nutz</groupId>
|
||||
<artifactId>nutzboot-starter-nutz-mvc</artifactId>
|
||||
<version>${nutzboot.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.nutz</groupId>
|
||||
<artifactId>nutzboot-starter-jetty</artifactId>
|
||||
<version>${nutzboot.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.nutz</groupId>
|
||||
<artifactId>nutzboot-starter-nutz-dao</artifactId>
|
||||
<version>${nutzboot.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.nutz</groupId>
|
||||
<artifactId>nutzboot-starter-jdbc</artifactId>
|
||||
<version>${nutzboot.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>${mysql-connector-java.version}</version>
|
||||
</dependency>
|
||||
<!--<dependency>-->
|
||||
<!--<groupId>com.oracle</groupId>-->
|
||||
<!--<artifactId>classes12</artifactId>-->
|
||||
<!--<version>10.2.0.2.0</version>-->
|
||||
<!--<scope>system</scope>-->
|
||||
<!--<systemPath>D://oracle/product/10.2.0/db_1/jdbc/lib/classes12.jar</systemPath>-->
|
||||
<!--</dependency>-->
|
||||
<dependency>
|
||||
<groupId>org.nutz</groupId>
|
||||
<artifactId>nutzboot-starter-redis</artifactId>
|
||||
<version>${nutzboot.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.nutz</groupId>
|
||||
<artifactId>nutzboot-starter-wkcache</artifactId>
|
||||
<version>${nutzboot.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.nutz</groupId>
|
||||
<artifactId>nutzboot-starter-weixin</artifactId>
|
||||
<version>${nutzboot.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.nutz</groupId>
|
||||
<artifactId>nutzboot-starter-ftp</artifactId>
|
||||
<version>${nutzboot.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.nutz</groupId>
|
||||
<artifactId>nutzboot-starter-beetl</artifactId>
|
||||
<version>${nutzboot.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.nutz</groupId>
|
||||
<artifactId>nutzboot-starter-quartz</artifactId>
|
||||
<version>${nutzboot.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.vdurmont</groupId>
|
||||
<artifactId>emoji-java</artifactId>
|
||||
<version>${emoji-java.veision}</version>
|
||||
</dependency>
|
||||
<!-- api token web server -->
|
||||
<dependency>
|
||||
<groupId>io.jsonwebtoken</groupId>
|
||||
<artifactId>jjwt</artifactId>
|
||||
<version>0.9.1</version>
|
||||
</dependency>
|
||||
<!-- sa-token -->
|
||||
<dependency>
|
||||
<groupId>cn.dev33</groupId>
|
||||
<artifactId>sa-token-core</artifactId>
|
||||
<version>${sa-token.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.dev33</groupId>
|
||||
<artifactId>sa-token-servlet</artifactId>
|
||||
<version>${sa-token.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- cas客户端 -->
|
||||
<dependency>
|
||||
<groupId>org.jasig.cas.client</groupId>
|
||||
<artifactId>cas-client-core</artifactId>
|
||||
<version>3.2.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.unicon.cas</groupId>
|
||||
<artifactId>cas-client-autoconfig-support</artifactId>
|
||||
<version>2.3.0-GA</version>
|
||||
</dependency>
|
||||
|
||||
<!-- html -->
|
||||
<dependency>
|
||||
<groupId>org.jsoup</groupId>
|
||||
<artifactId>jsoup</artifactId>
|
||||
<version>${jsoup.veision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.belerweb</groupId>
|
||||
<artifactId>pinyin4j</artifactId>
|
||||
<version>${pinyin4j.veision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>${commons-lang3.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>2.17.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.nutz</groupId>
|
||||
<artifactId>nutzboot-starter-test-junit4</artifactId>
|
||||
<version>${nutzboot.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-core</artifactId>
|
||||
<version>${logback.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
<version>${logback.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.whvcse</groupId>
|
||||
<artifactId>easy-captcha</artifactId>
|
||||
<version>${easy-captcha.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openjdk.nashorn</groupId>
|
||||
<artifactId>nashorn-core</artifactId>
|
||||
<version>15.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
<version>5.8.26</version>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>org.nutz</groupId>-->
|
||||
<!-- <artifactId>nutz-plugins-validation</artifactId>-->
|
||||
<!-- <version>1.r.69.v20220215</version>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency>
|
||||
<groupId>org.hibernate.validator</groupId>
|
||||
<artifactId>hibernate-validator</artifactId>
|
||||
<version>6.0.8.Final</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish</groupId>
|
||||
<artifactId>javax.el</artifactId>
|
||||
<version>3.0.1-b09</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jboss.logging</groupId>
|
||||
<artifactId>jboss-logging-annotations</artifactId>
|
||||
<version>2.1.0.Final</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>2.8.1</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.uuid</groupId>
|
||||
<artifactId>java-uuid-generator</artifactId>
|
||||
<version>3.1.3</version>
|
||||
</dependency>
|
||||
|
||||
<!--工作流相关-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>org.flowable</groupId>-->
|
||||
<!-- <artifactId>flowable-engine</artifactId>-->
|
||||
<!-- <!– <version>6.8.0</version>–>-->
|
||||
<!-- <version>7.0.1</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>org.camunda.bpm</groupId>-->
|
||||
<!-- <artifactId>camunda-engine</artifactId>-->
|
||||
<!-- <version>7.19.0</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!--工作流相关-->
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.googlecode.aviator</groupId>-->
|
||||
<!-- <artifactId>aviator</artifactId>-->
|
||||
<!-- <version>5.3.1</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<dependency>
|
||||
<groupId>com.deepoove</groupId>
|
||||
<artifactId>poi-tl</artifactId>
|
||||
<version>${poitl.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.afterturn</groupId>
|
||||
<artifactId>easypoi-base</artifactId>
|
||||
<version>${easypoi.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>poi</artifactId>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>poi-ooxml</artifactId>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>poi-ooxml-schemas</artifactId>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<groupId>org.slf4j</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-openapi2-spring-boot-starter</artifactId>
|
||||
<version>4.4.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.github.draco1023</groupId>
|
||||
<artifactId>poi-tl-ext</artifactId>
|
||||
<version>0.4.18-poi5</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.luhuiguo</groupId>
|
||||
<artifactId>aspose-words</artifactId>
|
||||
<version>23.1</version>
|
||||
</dependency>
|
||||
<!--xlsx或xls转pdf-->
|
||||
<dependency>
|
||||
<groupId>com.luhuiguo</groupId>
|
||||
<artifactId>aspose-cells</artifactId>
|
||||
<version>23.1</version>
|
||||
</dependency>
|
||||
<!--ppt转pdf-->
|
||||
<dependency>
|
||||
<groupId>com.luhuiguo</groupId>
|
||||
<artifactId>aspose-slides</artifactId>
|
||||
<version>23.1</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.nutz</groupId>
|
||||
<artifactId>nutzboot-parent</artifactId>
|
||||
<version>${nutzboot.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.xml.bind</groupId>
|
||||
<artifactId>jaxb-api</artifactId>
|
||||
<version>${jaxb-api.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<configuration>
|
||||
<source>17</source>
|
||||
<target>17</target>
|
||||
<compilerArgs>
|
||||
<arg>--add-opens</arg>
|
||||
<arg>java.base/java.lang=ALL-UNNAMED</arg>
|
||||
</compilerArgs>
|
||||
<useIncrementalCompilation>false</useIncrementalCompilation>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.0.1</version>
|
||||
<configuration>
|
||||
<encoding>UTF-8</encoding>
|
||||
<charset>UTF-8</charset>
|
||||
<docencoding>UTF-8</docencoding>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-javadocs</id>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>3.0.1</version>
|
||||
<configuration>
|
||||
<attach>true</attach>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>compile</phase>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.22.0</version>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.nutz.boot</groupId>
|
||||
<artifactId>nutzboot-maven-plugin</artifactId>
|
||||
<version>${nutzboot.version}</version>
|
||||
<configuration>
|
||||
<mainClass>com.budwk.app.MainLauncher</mainClass>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**/*</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
</build>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>nutz</id>
|
||||
<url>https://jfrog.nutz.cn/artifactory/libs-release</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>nutz-snapshots</id>
|
||||
<url>https://jfrog.nutz.cn/artifactory/snapshots</url>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
<updatePolicy>always</updatePolicy>
|
||||
</snapshots>
|
||||
<releases>
|
||||
<enabled>false</enabled>
|
||||
</releases>
|
||||
</repository>
|
||||
</repositories>
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>nutz-snapshots</id>
|
||||
<url>https://jfrog.nutz.cn/artifactory/snapshots</url>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
<updatePolicy>always</updatePolicy>
|
||||
</snapshots>
|
||||
<releases>
|
||||
<enabled>false</enabled>
|
||||
</releases>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
</project>
|
||||
@@ -0,0 +1,161 @@
|
||||
package com.budwk.app;
|
||||
|
||||
import cn.dev33.satoken.SaManager;
|
||||
import cn.dev33.satoken.config.SaTokenConfig;
|
||||
import com.budwk.app.sys.services.SysTaskService;
|
||||
import com.budwk.app.task.services.TaskPlatformService;
|
||||
import com.budwk.app.web.commons.auth.satoken.SaTokenContextImpl;
|
||||
import com.budwk.app.web.commons.auth.satoken.SaTokenDaoRedisImpl;
|
||||
import com.budwk.app.web.commons.auth.satoken.StpInterfaceImpl;
|
||||
import com.budwk.app.web.commons.base.Globals;
|
||||
import com.budwk.app.web.commons.ext.pubsub.WebPubSub;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.beetl.core.GroupTemplate;
|
||||
import org.nutz.boot.NbApp;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.impl.FileSqlManager;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.util.Daos;
|
||||
import org.nutz.integration.jedis.JedisAgent;
|
||||
import org.nutz.ioc.Ioc;
|
||||
import org.nutz.ioc.impl.PropertiesProxy;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Mirror;
|
||||
import org.nutz.mvc.Mvcs;
|
||||
import org.nutz.mvc.annotation.ChainBy;
|
||||
import org.nutz.mvc.annotation.Encoding;
|
||||
import org.nutz.mvc.annotation.Localization;
|
||||
import org.quartz.Scheduler;
|
||||
|
||||
import javax.management.MBeanServer;
|
||||
import javax.management.ObjectName;
|
||||
import javax.servlet.ServletContext;
|
||||
import java.lang.management.ManagementFactory;
|
||||
import java.sql.Driver;
|
||||
import java.sql.DriverManager;
|
||||
import java.util.Enumeration;
|
||||
import java.util.List;
|
||||
|
||||
@IocBean(create = "init", depose = "depose")
|
||||
@Localization(value = "locales/", defaultLocalizationKey = "zh_CN")
|
||||
@Encoding(input = "UTF-8", output = "UTF-8")
|
||||
@ChainBy(args = "chain/mvc-chain.json")
|
||||
@Slf4j
|
||||
public class MainLauncher {
|
||||
protected static final String PRE = "security.";
|
||||
@Inject("refer:$ioc")
|
||||
private Ioc ioc;
|
||||
@Inject
|
||||
private PropertiesProxy conf;
|
||||
@Inject
|
||||
private JedisAgent jedisAgent;
|
||||
@Inject
|
||||
private WebPubSub webPubSub;//注入一下为了初始化
|
||||
@Inject
|
||||
private GroupTemplate groupTemplate;
|
||||
@Inject
|
||||
private TaskPlatformService taskPlatformService;
|
||||
@Inject
|
||||
private SysTaskService sysTaskService;
|
||||
@Inject
|
||||
private Dao dao;
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
NbApp nb = new NbApp().setArgs(args).setPrintProcDoc(true);
|
||||
nb.getAppContext().setMainPackage("com.budwk");
|
||||
nb.run();
|
||||
}
|
||||
|
||||
public static NbApp warMain(ServletContext sc) {
|
||||
NbApp nb = new NbApp().setPrintProcDoc(true);
|
||||
nb.getAppContext().setMainPackage("com.budwk");
|
||||
return nb;
|
||||
}
|
||||
|
||||
public void init() {
|
||||
Mvcs.DISABLE_X_POWERED_BY = true;
|
||||
Globals.AppBase = Mvcs.getServletContext().getContextPath();
|
||||
Globals.AppRoot = Mvcs.getServletContext().getRealPath("/");
|
||||
init_sys();
|
||||
init_task();
|
||||
init_auth();
|
||||
ioc.get(Globals.class);
|
||||
}
|
||||
|
||||
public void init_auth() {
|
||||
SaTokenConfig saTokenConfig = conf.makeDeep(SaTokenConfig.class, PRE);
|
||||
String tokenName = conf.get(PRE + "tokenName", "token");
|
||||
// 注意这里的token默认超时时间与控制中心 websocket 超时时间保持一致
|
||||
saTokenConfig.setTimeout(conf.getLong(PRE + "timeout", 86400));
|
||||
saTokenConfig.setTokenName(tokenName);
|
||||
saTokenConfig.setIsV(false);
|
||||
SaManager.setConfig(saTokenConfig);
|
||||
SaManager.setSaTokenContext(ioc.get(SaTokenContextImpl.class));
|
||||
SaManager.setSaTokenDao(ioc.get(SaTokenDaoRedisImpl.class));
|
||||
SaManager.setStpInterface(ioc.get(StpInterfaceImpl.class));
|
||||
}
|
||||
|
||||
private void init_task() {
|
||||
if (log.isDebugEnabled() && !dao.exists("sys_qrtz_triggers") && !dao.exists("sys_qrtz_triggers".toUpperCase())) {
|
||||
//执行Quartz SQL脚本
|
||||
String dbType = dao.getJdbcExpert().getDatabaseType();
|
||||
log.debug("dbType:::" + dbType);
|
||||
FileSqlManager fmq = new FileSqlManager("db/quartz/" + dbType.toLowerCase() + ".sql");
|
||||
List<Sql> sqlListq = fmq.createCombo(fmq.keys());
|
||||
Sql[] sqlsq = sqlListq.toArray(new Sql[sqlListq.size()]);
|
||||
for (Sql sql : sqlsq) {
|
||||
dao.execute(sql);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void init_sys() {
|
||||
if (log.isDebugEnabled()) {
|
||||
//通过POJO类创建表结构
|
||||
try {
|
||||
Daos.createTablesInPackage(dao, "com.budwk", false);
|
||||
//通过POJO类修改表结构
|
||||
// Daos.migration(dao, "com.budwk", true, false);
|
||||
Daos.migration(dao, "com.budwk", true, false, false);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void depose() {
|
||||
// 非mysql数据库,或多webapp共享mysql驱动的话,以下语句删掉
|
||||
try {
|
||||
Mirror.me(Class.forName("com.mysql.jdbc.AbandonedConnectionCleanupThread")).invoke(null, "shutdown");
|
||||
} catch (Throwable e) {
|
||||
}
|
||||
// 解决quartz有时候无法停止的问题
|
||||
try {
|
||||
ioc.get(Scheduler.class).shutdown(true);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
// 解决com.alibaba.druid.proxy.DruidDriver和com.mysql.jdbc.Driver在reload时报warning的问题
|
||||
// 多webapp共享mysql驱动的话,以下语句删掉
|
||||
Enumeration<Driver> en = DriverManager.getDrivers();
|
||||
while (en.hasMoreElements()) {
|
||||
try {
|
||||
Driver driver = en.nextElement();
|
||||
String className = driver.getClass().getName();
|
||||
log.debug("deregisterDriver: " + className);
|
||||
DriverManager.deregisterDriver(driver);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
try {
|
||||
MBeanServer mbeanServer = ManagementFactory.getPlatformMBeanServer();
|
||||
ObjectName objectName = new ObjectName("com.alibaba.druid:type=MockDriver");
|
||||
if (mbeanServer.isRegistered(objectName))
|
||||
mbeanServer.unregisterMBean(objectName);
|
||||
objectName = new ObjectName("com.alibaba.druid:type=DruidDriver");
|
||||
if (mbeanServer.isRegistered(objectName))
|
||||
mbeanServer.unregisterMBean(objectName);
|
||||
} catch (Exception ex) {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.budwk.app.base.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* 字典枚举类注解,方便收集做为字典使用的
|
||||
*/
|
||||
@Target({ElementType.TYPE})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Inherited
|
||||
@Documented
|
||||
public @interface DictEnum{
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
String name();
|
||||
|
||||
/**
|
||||
* 唯一标识
|
||||
*/
|
||||
String key();
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.budwk.app.base.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* 自定义注解防止表单重复提交
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Target(ElementType.METHOD)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
public @interface RepeatSubmit {
|
||||
/**
|
||||
* 间隔时间(ms),小于此时间视为重复提交
|
||||
*/
|
||||
public int interval() default 5000;
|
||||
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
public String message() default "请求过于频繁,请稍后再试";
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.budwk.app.base.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
@Target({ElementType.METHOD, ElementType.TYPE})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
@Inherited
|
||||
public @interface SLog {
|
||||
String type() default "platform";
|
||||
|
||||
/**
|
||||
* 标签
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
String tag();
|
||||
|
||||
String msg() default "";
|
||||
|
||||
/**
|
||||
* 是否记录传递参数
|
||||
*
|
||||
* @return 消息模板
|
||||
*/
|
||||
boolean param() default true;
|
||||
|
||||
/**
|
||||
* 记录执行结果
|
||||
*
|
||||
* @return 消息模板
|
||||
*/
|
||||
boolean result() default true;
|
||||
|
||||
/**
|
||||
* 是否异步执行,默认为true
|
||||
*
|
||||
* @return true, 如果需要异步执行
|
||||
*/
|
||||
boolean async() default true;
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
package com.budwk.app.base.config;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Lang;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:ThreadPoolConfig
|
||||
* @Date 2024/9/2 10:18
|
||||
* @注释
|
||||
*/
|
||||
@Slf4j
|
||||
@IocBean
|
||||
public class ThreadPoolConfig {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
|
||||
/**
|
||||
* 核心线程数(默认线程数)
|
||||
*/
|
||||
private static final int CORE_POOL_SIZE = 2 * Runtime.getRuntime().availableProcessors() + 1;
|
||||
|
||||
/**
|
||||
* 最大线程数
|
||||
*/
|
||||
private static final int MAX_POOL_SIZE = 128;
|
||||
|
||||
/**
|
||||
* 允许线程空闲时间(单位:默认为秒)
|
||||
*/
|
||||
private static final int KEEP_ALIVE_TIME = 5;
|
||||
|
||||
/**
|
||||
* 任务的等待时间
|
||||
*/
|
||||
private static final int AWAIT_TERMINATION_TIME = 30;
|
||||
|
||||
/**
|
||||
* 缓冲队列数
|
||||
*/
|
||||
private static final int QUEUE_CAPACITY = 1200;
|
||||
|
||||
/**
|
||||
* 线程池名前缀
|
||||
*/
|
||||
private static final String THREAD_NAME_PREFIX = "dd3s-thread-pool";
|
||||
|
||||
/**
|
||||
* bean的名称,默认为首字母小写的方法名
|
||||
* spring管理的线程池,顶级父类也是Executor
|
||||
*/
|
||||
@IocBean(name = "executorService")
|
||||
public ThreadPoolTaskExecutor executorService() {
|
||||
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
||||
executor.setCorePoolSize(CORE_POOL_SIZE);
|
||||
executor.setMaxPoolSize(MAX_POOL_SIZE);
|
||||
executor.setQueueCapacity(QUEUE_CAPACITY);
|
||||
executor.setKeepAliveSeconds(KEEP_ALIVE_TIME);
|
||||
executor.setThreadNamePrefix(THREAD_NAME_PREFIX);
|
||||
executor.setAwaitTerminationSeconds(AWAIT_TERMINATION_TIME);
|
||||
executor.setWaitForTasksToCompleteOnShutdown(true);
|
||||
|
||||
// 线程池对拒绝任务的处理策略
|
||||
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
|
||||
executor.initialize();
|
||||
return executor;
|
||||
}
|
||||
|
||||
/**
|
||||
* 异步执行
|
||||
*
|
||||
* @param list 泛型list,任意实体类集合
|
||||
* @param batchSize 期望单次操作的数量,默认200
|
||||
* @param mode insert插入 ; update更新 ; insertOrUpdate插入或更新
|
||||
* @param isFastInsertOrUpdateIgnoreNull mode为新增此值为true代表fastInsert;mode为修改时此值为true代表updateIgnoreNull
|
||||
* @param <T>
|
||||
*/
|
||||
public <T> void asyncExecute(List<T> list, Integer batchSize, String mode, boolean isFastInsertOrUpdateIgnoreNull) {
|
||||
if (Lang.isEmpty(list)) {
|
||||
return;
|
||||
}
|
||||
if (batchSize == null || batchSize <= 0) {
|
||||
batchSize = 200;
|
||||
}
|
||||
for (int i = 0; i < list.size(); i += batchSize) {
|
||||
final int end = Math.min(i + batchSize, list.size());
|
||||
List<T> batch = list.subList(i, end);
|
||||
executorService().execute(() -> {
|
||||
try {
|
||||
switch(mode) {
|
||||
case "insert" -> {
|
||||
if (isFastInsertOrUpdateIgnoreNull) {
|
||||
dao.fastInsert(batch);
|
||||
} else {
|
||||
dao.insert(batch);
|
||||
}
|
||||
}
|
||||
case "update" -> {
|
||||
if (isFastInsertOrUpdateIgnoreNull) {
|
||||
dao.updateIgnoreNull(batch);
|
||||
} else {
|
||||
dao.update(batch);
|
||||
}
|
||||
}
|
||||
case "insertOrUpdate" -> dao.insertOrUpdate(batch);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// 日志记录异常信息
|
||||
System.err.println("Error occurred while inserting batch: " + e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.budwk.app.base.constant;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 流程常量
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum BpmProcessConstant {
|
||||
|
||||
WARMTH_CONDOLENCE("送温暖慰问"),
|
||||
|
||||
LOVE_ASSIST("爱心扶助基金"),
|
||||
|
||||
PROPOSAL("提案"),
|
||||
|
||||
SUGGESTION_TC("教代会意见建议"),
|
||||
|
||||
SUGGESTION_WC("工代会意见建议"),
|
||||
|
||||
GRASSROOTS_CONGRESS("基层双代会"),
|
||||
|
||||
GRASSROOTS_CONGRESS_MATERIALS("基层双代会会议资料"),
|
||||
|
||||
MEMBER_SINGLE_APPLY("会员入会申请"),
|
||||
|
||||
MEMBER_BRANCH_UNION_CHANGE("会员分工会变更"),
|
||||
|
||||
CLUB_JOIN("协会入会申请"),
|
||||
|
||||
CLUB_EXAMINE("协会考核"),
|
||||
|
||||
CLUB_EVALUATE("协会评优"),
|
||||
|
||||
CLUB_REGISTER("协会注册"),
|
||||
|
||||
PERSON_EVALUATE("评优评先申请"),
|
||||
|
||||
ARTICLE("新闻投稿")
|
||||
|
||||
;
|
||||
|
||||
public final String description;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.budwk.app.base.constant;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ProcessBusinessConstant {
|
||||
|
||||
CONDOLENCE_APPLY("慰问");
|
||||
|
||||
/**
|
||||
* 避免和枚举类的name冲突
|
||||
*/
|
||||
public final String roleName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.budwk.app.base.constant;
|
||||
|
||||
/**
|
||||
* @author wizzer@qq.com
|
||||
*/
|
||||
public class RedisConstant {
|
||||
//项目统一前缀
|
||||
public final static String PLATFORM_REDIS_PREFIX = "budwk5mini:";
|
||||
public final static String PLATFORM_REDIS_WKCACHE_PREFIX = PLATFORM_REDIS_PREFIX + "wkcache:";
|
||||
|
||||
//聊天室
|
||||
public final static String REDIS_KEY_WSROOM = PLATFORM_REDIS_PREFIX + "wsroom:";
|
||||
|
||||
public final static String REDIS_KEY_LOGIN_ADMIN_CAPTCHA = PLATFORM_REDIS_PREFIX + "admin:login:captcha:";
|
||||
public final static String REDIS_KEY_ADMIN_PUBSUB = PLATFORM_REDIS_PREFIX + "admin:pubsub:";
|
||||
|
||||
//微信token
|
||||
public final static String REDIS_KEY_WX_TOKEN = PLATFORM_REDIS_PREFIX + "wx:token:";
|
||||
|
||||
//企业微信token
|
||||
public final static String REDIS_KEY_WX_WORK_TOKEN = PLATFORM_REDIS_PREFIX + "wxwork:token:";
|
||||
|
||||
//图形验证码
|
||||
public final static String REDIS_CAPTCHA_KEY = PLATFORM_REDIS_PREFIX + "platfrom:captcha:";
|
||||
|
||||
//短信验证码
|
||||
public final static String REDIS_SMSCODE_KEY = PLATFORM_REDIS_PREFIX + "platfrom:smscode:";
|
||||
|
||||
public final static String REDIS_KEY_API_SIGN_DEPLOY_NONCE = PLATFORM_REDIS_PREFIX + "api:sign:deploy:nonce:";
|
||||
public final static String REDIS_KEY_API_SIGN_OPEN_NONCE = PLATFORM_REDIS_PREFIX + "api:sign:open:nonce:";
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Token 缓存前缀
|
||||
*/
|
||||
public static final String TOKEN = PLATFORM_REDIS_PREFIX + "token:";
|
||||
|
||||
/**
|
||||
* 验证码前缀
|
||||
*/
|
||||
public static final String UCENTER_CAPTCHA = PLATFORM_REDIS_PREFIX + "ucenter:captcha:";
|
||||
|
||||
/**
|
||||
* 短信验证码前缀
|
||||
*/
|
||||
public static final String UCENTER_SMSCODE = PLATFORM_REDIS_PREFIX + "ucenter:smscode:";
|
||||
|
||||
/**
|
||||
* 接口重复提交前缀
|
||||
*/
|
||||
public static final String REPEAT_SUBMIT_PREFIX = PLATFORM_REDIS_PREFIX + "repeat_submit:";
|
||||
|
||||
/**
|
||||
* 签名前缀
|
||||
*/
|
||||
public static final String SIGNATURE_PREFIX = PLATFORM_REDIS_PREFIX + "sys:signature:";
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
package com.budwk.app.base.constant;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 角色常量
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum
|
||||
RoleConstant {
|
||||
PUBLIC("公共角色"),
|
||||
MEMBER("会员角色"),
|
||||
SYSADMIN("系统管理员"),
|
||||
|
||||
SCHOOL_UNION_ADMIN("校工会管理员"),
|
||||
SCHOOL_UNION_CHAIRMAN("校工会主席"),
|
||||
SCHOOL_UNION_VICE_CHAIRMAN("校工会副主席"),
|
||||
SCHOOL_UNION_WELFARE_ADMIN("校工会福利管理员"),
|
||||
SCHOOL_UNION_MEMBER_ADMIN("校工会会员管理员"),
|
||||
SCHOOL_UNION_TC_ADMIN("校工会教代会管理员"),
|
||||
SCHOOL_UNION_WC_ADMIN("校工会工代会管理员"),
|
||||
SCHOOL_UNION_DC_ADMIN("校工会民主管理员"),
|
||||
SCHOOL_UNION_PROPOSAL_ADMIN("校工会提案管理员"),
|
||||
SCHOOL_UNION_CLUB_ADMIN("校工会协会管理员"),
|
||||
SCHOOL_UNION_ACTIVITY_ADMIN("校工会活动管理员"),
|
||||
SCHOOL_UNION_ARTICLE_CLUB_ADMIN("校工会协会新闻审批管理员"),
|
||||
SCHOOL_UNION_ARTICLE_FGH_ADMIN("校工会分工会新闻审批管理员"),
|
||||
SCHOOL_UNION_ARTICLE_ADMIN("校工会新闻审批管理员"),
|
||||
|
||||
BRANCH_UNION_ADMIN("分工会管理员"),
|
||||
BRANCH_UNION_CHAIRMAN("分工会主席"),
|
||||
BRANCH_UNION_VICE_CHAIRMAN("分工会副主席"),
|
||||
BRANCH_UNION_OPERATOR("分工会操作员"),
|
||||
BRANCH_UNION_GROUP_LEADER("工会小组组长"),
|
||||
BRANCH_UNION_ARTICLE_WRITER("分工会新闻投稿员"),
|
||||
BRANCH_UNION_WY("分工会委员"),
|
||||
BRANCH_UNION_ZUZHI_WY("分工会组织委员"),
|
||||
BRANCH_UNION_XUANCHUAN_WY("分工会宣传委员"),
|
||||
BRANCH_UNION_NVGONG_WY("分工会女工委员"),
|
||||
BRANCH_UNION_QINGNIAN_WY("分工会青年委员"),
|
||||
BRANCH_UNION_WENTI_WY("分工会文体委员"),
|
||||
BRANCH_UNION_SHENGGHUO_WY("分工会生活委员"),
|
||||
BRANCH_UNION_TIAOJIE_WY("分工会调解委员"),
|
||||
|
||||
TEACHER_CONGRESS_DELEGATE_FORMAL("教代会正式代表"),
|
||||
TEACHER_CONGRESS_DELEGATE_ATTENDANCE("教代会列席代表"),
|
||||
TEACHER_CONGRESS_DELEGATE_SPECIALLY_INVITE("教代会特邀代表"),
|
||||
TEACHER_CONGRESS_DELEGATION_HEAD("教代会代表团团长"),
|
||||
|
||||
PROPOSAL_COMMITTEE_DIRECTOR("提案委员会主任"),
|
||||
PROPOSAL_COMMITTEE_DEPUTY_DIRECTOR("提案委员会副主任"),
|
||||
PROPOSAL_BRANCH_SCHOOL_LEADER("提案分管校领导"),
|
||||
PROPOSAL_UNIT_LEADER("提案承办单位领导"),
|
||||
PROPOSAL_UNIT_PROXY("提案承办单位代理答复人"),
|
||||
|
||||
|
||||
WORKER_CONGRESS_DELEGATE_FORMAL("工代会正式代表"),
|
||||
WORKER_CONGRESS_DELEGATE_ATTENDANCE("工代会列席代表"),
|
||||
WORKER_CONGRESS_DELEGATE_SPECIALLY_INVITE("工代会特邀代表"),
|
||||
WORKER_CONGRESS_DELEGATION_HEAD("工代会代表团团长"),
|
||||
|
||||
SCHOOL_UNION_WC_AUDIT_ADMIN("基层双代会校工会批复人"),
|
||||
|
||||
SCHOOL_HOSPITAL_LEADER("校医院负责人"),
|
||||
|
||||
/*协会模块*/
|
||||
CLUB_MEMBER("协会会员"),
|
||||
CLUB_MANAGER("协会负责人"),
|
||||
CLUB_PRESIDENT("协会会长"),
|
||||
CLUB_VICE_PRESIDENT("协会副会长"),
|
||||
CLUB_SECRETARY("协会秘书长"),
|
||||
CLUB_VICE_SECRETARY("协会副秘书长"),
|
||||
// SCHOOL_UNION_CLUB_ADMIN("校工会协会管理员"),
|
||||
CLUB_AUDIT_LEADER("协会分管领导"),
|
||||
CLUB_OPERATOR("协会操作员"),
|
||||
|
||||
/*大病基金会员*/
|
||||
AID_FUND_MEMBER("大病基金会员"),
|
||||
|
||||
|
||||
/*爱心扶助基金*/
|
||||
LOVE_ASSIST_WORK_GROUP_LEADER("爱心扶助小组组长"),
|
||||
LOVE_ASSIST_WORK_GROUP_MEMBER("爱心扶助小组审批员"),
|
||||
|
||||
;
|
||||
/**
|
||||
* 避免和枚举类的name冲突
|
||||
*/
|
||||
public final String roleName;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.budwk.app.base.enums;
|
||||
|
||||
/**
|
||||
* 浏览器平台
|
||||
*/
|
||||
public enum BrowserPlatform {
|
||||
|
||||
PC_WEB,
|
||||
|
||||
H5_WEB,
|
||||
|
||||
WEI_XIN,
|
||||
|
||||
QI_YE_WEI_XIN;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.budwk.app.base.enums;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Optional;
|
||||
|
||||
public interface CodedEnum {
|
||||
|
||||
Integer getCode();
|
||||
|
||||
String getMessage();
|
||||
|
||||
public static <E extends Enum<?> & CodedEnum> Optional<E> codeOf(Class<E> enumClass, Object code) {
|
||||
try {
|
||||
return Arrays.stream(enumClass.getEnumConstants()).filter(e ->
|
||||
e.getCode().equals(Convert.toInt(code))
|
||||
|| e.name().equalsIgnoreCase(Convert.toStr(code))
|
||||
|| e.getMessage().equalsIgnoreCase(Convert.toStr(code))
|
||||
).findAny();
|
||||
} catch (Exception e) {
|
||||
return Optional.empty();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取数据类型,用于转换String或Integer
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
default Class<?> getDataType() {
|
||||
return Integer.class;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.budwk.app.base.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 登录类型
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum LoginType {
|
||||
|
||||
QI_YE_WECHAT("企业微信"),
|
||||
WECHAT("微信"),
|
||||
PC_LOCAL("PC本地"),
|
||||
MOBILE_LOCAL("手机本地"),
|
||||
CAS("CAS");
|
||||
|
||||
private final String value;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.budwk.app.base.enums;
|
||||
|
||||
/**
|
||||
* 文件存储桶的权限策略枚举
|
||||
*/
|
||||
public enum MinIoFileBucketAuthEnum {
|
||||
/**
|
||||
* 私有的(仅有 owner 可以读写)
|
||||
*/
|
||||
PRIVATE,
|
||||
|
||||
/**
|
||||
* 公有读,私有写( owner 可以读写, 其他客户可以读)
|
||||
*/
|
||||
PUBLIC_READ,
|
||||
|
||||
/**
|
||||
* 公共读写(即所有人都可以读写,慎用)
|
||||
*/
|
||||
PUBLIC_READ_WRITE
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.budwk.app.base.enums;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author mldong
|
||||
* @date 2023/9/27
|
||||
*/
|
||||
@Data
|
||||
//@ApiModel(value = "UpAndDownParam对象", description = "启用/禁用实体")
|
||||
public class UpAndDownParam {
|
||||
// @ApiModelProperty(value = "id集合")
|
||||
private List<Object> ids;
|
||||
// @ApiModelProperty(value = "操作类型")
|
||||
private YesNoEnum opType;
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.budwk.app.base.enums;
|
||||
|
||||
import com.budwk.app.base.annotation.DictEnum;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
|
||||
/**
|
||||
* yes_no
|
||||
*
|
||||
* @author mldong
|
||||
*/
|
||||
@DictEnum(key = "yes_no", name = "是否")
|
||||
public enum YesNoEnum implements CodedEnum {
|
||||
/**
|
||||
* 是
|
||||
*/
|
||||
YES(1, "是"),
|
||||
/**
|
||||
* 否
|
||||
*/
|
||||
NO(0, "否");
|
||||
private Integer code;
|
||||
private String message;
|
||||
/**
|
||||
* 未删除
|
||||
*/
|
||||
public final static int Y = 1;
|
||||
/**
|
||||
* 已删除
|
||||
*/
|
||||
public final static int N = 0;
|
||||
|
||||
@JsonCreator
|
||||
public static YesNoEnum forValue(Object value) {
|
||||
return CodedEnum.codeOf(YesNoEnum.class, value).get();
|
||||
}
|
||||
|
||||
YesNoEnum(int value, String name) {
|
||||
this.code = value;
|
||||
this.message = name;
|
||||
}
|
||||
|
||||
@JsonValue
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.budwk.app.base.event.user;
|
||||
|
||||
import com.budwk.app.zhgh.staffmanage.member.constant.MemberChangeType;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
public class SysUserEvent {
|
||||
|
||||
//变更类型
|
||||
private MemberChangeType memberChangeType;
|
||||
|
||||
//userId
|
||||
private String userId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.budwk.app.base.event.user;
|
||||
|
||||
public interface SysUserEventListener {
|
||||
|
||||
void onEvent(SysUserEvent event);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.budwk.app.base.event.user;
|
||||
|
||||
import org.nutz.mvc.Mvcs;
|
||||
|
||||
public class SysUserPublisher {
|
||||
public static void notify(SysUserEvent event){
|
||||
String[] names = Mvcs.getIoc().getNamesByType(SysUserEventListener.class);
|
||||
for (String name : names) {
|
||||
SysUserEventListener listener = Mvcs.getIoc().get(SysUserEventListener.class, name);
|
||||
listener.onEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.budwk.app.base.event.user;
|
||||
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
@IocBean
|
||||
public class Test2SysUserEventListener implements SysUserEventListener{
|
||||
|
||||
@Override
|
||||
public void onEvent(SysUserEvent event) {
|
||||
System.out.println("-----------------------------------");
|
||||
System.out.println(event);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.budwk.app.base.event.user;
|
||||
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
@IocBean
|
||||
public class TestSysUserEventListener implements SysUserEventListener{
|
||||
|
||||
@Override
|
||||
public void onEvent(SysUserEvent event) {
|
||||
System.out.println("-----------------------------------");
|
||||
System.out.println(event);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.budwk.app.base.exception;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
|
||||
/**
|
||||
* @author wizzer@qq.com
|
||||
*/
|
||||
public class BaseException extends RuntimeException{
|
||||
|
||||
private static final long serialVersionUID = 7192152812384031563L;
|
||||
|
||||
public BaseException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public BaseException(String message, Object... arguments) {
|
||||
super(StrUtil.format(message, arguments));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.budwk.app.base.exception;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
|
||||
/**
|
||||
* 方法参数校验异常
|
||||
*/
|
||||
public class MethodArgumentNotValidException extends RuntimeException{
|
||||
|
||||
public MethodArgumentNotValidException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public MethodArgumentNotValidException(String message, Object... arguments) {
|
||||
super(StrUtil.format(message, arguments));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.budwk.app.base.exception;
|
||||
|
||||
public class UnknownAccountException extends BaseException{
|
||||
|
||||
public UnknownAccountException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package com.budwk.app.base.interceptor.repeatSubmit;
|
||||
|
||||
import com.budwk.app.base.annotation.RepeatSubmit;
|
||||
import org.nutz.aop.MethodInterceptor;
|
||||
import org.nutz.ioc.Ioc;
|
||||
import org.nutz.ioc.aop.SimpleAopMaker;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.List;
|
||||
|
||||
@IocBean(name = "$aop_repeatSubmit")
|
||||
public class RepeatSubmitAopConfiguration extends SimpleAopMaker<RepeatSubmit> {
|
||||
|
||||
@Override
|
||||
public List<? extends MethodInterceptor> makeIt(RepeatSubmit repeatSubmit, Method method, Ioc ioc) {
|
||||
return List.of(new RepeatSubmitAopInterceptor(ioc, repeatSubmit, method));
|
||||
}
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
package com.budwk.app.base.interceptor.repeatSubmit;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.budwk.app.base.annotation.RepeatSubmit;
|
||||
import com.budwk.app.base.constant.RedisConstant;
|
||||
import com.budwk.app.base.exception.BaseException;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import org.nutz.aop.InterceptorChain;
|
||||
import org.nutz.aop.MethodInterceptor;
|
||||
import org.nutz.integration.jedis.RedisService;
|
||||
import org.nutz.ioc.Ioc;
|
||||
import org.nutz.mvc.Mvcs;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
public class RepeatSubmitAopInterceptor implements MethodInterceptor {
|
||||
|
||||
protected Ioc ioc;
|
||||
|
||||
public RepeatSubmitAopInterceptor(Ioc ioc, RepeatSubmit repeatSubmit, Method method) {
|
||||
RedisService redisService = ioc.get(RedisService.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void filter(InterceptorChain chain) throws Throwable {
|
||||
Method method = chain.getCallingMethod();
|
||||
RepeatSubmit annotation = method.getAnnotation(RepeatSubmit.class);
|
||||
int interval = annotation.interval();
|
||||
RedisService redisService = Mvcs.getIoc().get(RedisService.class);
|
||||
String source = method.getDeclaringClass().getName() + "#" + method.getName();
|
||||
Object[] args = chain.getArgs();
|
||||
String parameterJson = "";
|
||||
if (ObjectUtil.isNotEmpty(args)) {
|
||||
parameterJson = JSONUtil.toJsonStr(args); // 序列化实际参数
|
||||
}
|
||||
String key = RedisConstant.REPEAT_SUBMIT_PREFIX + SecurityUtil.getUserId() + ":" + source;
|
||||
|
||||
Boolean exists = redisService.exists(key);
|
||||
if (exists) {
|
||||
// 判断
|
||||
String oldParameterJson = redisService.get(key);
|
||||
if (oldParameterJson != null && oldParameterJson.equalsIgnoreCase(parameterJson)) {
|
||||
throw new BaseException(annotation.message());
|
||||
}
|
||||
} else {
|
||||
redisService.setex(key, interval / 1000, parameterJson);
|
||||
}
|
||||
chain.doChain();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.budwk.app.base.interceptor.sLog;
|
||||
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import org.nutz.aop.MethodInterceptor;
|
||||
import org.nutz.ioc.Ioc;
|
||||
import org.nutz.ioc.aop.SimpleAopMaker;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by wizzer on 2016/6/22.
|
||||
*/
|
||||
@IocBean(name = "$aop_syslog")
|
||||
public class SLogAopConfigration extends SimpleAopMaker<SLog> {
|
||||
|
||||
@Inject("refer:$ioc")
|
||||
protected Ioc ioc;
|
||||
|
||||
public List<? extends MethodInterceptor> makeIt(SLog slog, Method method, Ioc ioc) {
|
||||
return Arrays.asList(new SLogAopInterceptor(ioc, slog, method));
|
||||
}
|
||||
|
||||
public String[] getName() {
|
||||
return new String[0];
|
||||
}
|
||||
|
||||
public boolean has(String name) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package com.budwk.app.base.interceptor.sLog;
|
||||
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import org.nutz.aop.InterceptorChain;
|
||||
import org.nutz.aop.MethodInterceptor;
|
||||
import org.nutz.el.El;
|
||||
import org.nutz.ioc.Ioc;
|
||||
import org.nutz.lang.segment.CharSegment;
|
||||
import org.nutz.log.Log;
|
||||
import org.nutz.log.Logs;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Created by wizzer on 2016/6/22.
|
||||
*/
|
||||
public class SLogAopInterceptor implements MethodInterceptor {
|
||||
private static final Log log = Logs.get();
|
||||
|
||||
protected SLogService sLogService;
|
||||
|
||||
protected String source;
|
||||
|
||||
protected String type;
|
||||
protected String tag;
|
||||
protected CharSegment seg;
|
||||
protected boolean param;
|
||||
protected boolean result;
|
||||
protected boolean async;
|
||||
protected Map<String, El> els;
|
||||
protected Ioc ioc;
|
||||
|
||||
public SLogAopInterceptor(Ioc ioc, SLog slog, Method method) {
|
||||
this.seg = new CharSegment(slog.msg());
|
||||
if (seg.hasKey()) {
|
||||
els = new HashMap<String, El>();
|
||||
for (String key : seg.keys()) {
|
||||
els.put(key, new El(key));
|
||||
}
|
||||
}
|
||||
this.param = slog.param();
|
||||
this.result = slog.result();
|
||||
this.ioc = ioc;
|
||||
this.source = method.getDeclaringClass().getName() + "#" + method.getName();
|
||||
this.tag = slog.tag();
|
||||
SLog _s = method.getDeclaringClass().getAnnotation(SLog.class);
|
||||
if (_s != null) {
|
||||
this.tag = _s.tag() + "," + this.tag;
|
||||
}
|
||||
this.type = slog.type();
|
||||
this.async = slog.async();
|
||||
}
|
||||
|
||||
public void filter(InterceptorChain chain) throws Throwable {
|
||||
try {
|
||||
chain.doChain();
|
||||
doLog("aop.after", seg, chain, null);
|
||||
} catch (Throwable e) {
|
||||
doLog("aop.error", seg, chain, e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
protected void doLog(String t, CharSegment seg, InterceptorChain chain, Throwable e) {
|
||||
if (sLogService == null)
|
||||
sLogService = ioc.get(SLogService.class);
|
||||
try {
|
||||
sLogService.log(t,
|
||||
type,
|
||||
tag,
|
||||
source,
|
||||
seg,
|
||||
els,
|
||||
param,
|
||||
result,
|
||||
async,
|
||||
chain.getArgs(),
|
||||
chain.getReturn(),
|
||||
chain.getCallingMethod(),
|
||||
chain.getCallingObj(),
|
||||
e);
|
||||
} catch (Exception e1) {
|
||||
log.debug("slog fail", e1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,230 @@
|
||||
package com.budwk.app.base.interceptor.sLog;
|
||||
|
||||
import com.budwk.app.sys.models.Sys_log;
|
||||
import com.budwk.app.sys.services.SysLogService;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import org.nutz.Nutz;
|
||||
import org.nutz.el.El;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.json.Json;
|
||||
import org.nutz.lang.Lang;
|
||||
import org.nutz.lang.segment.CharSegment;
|
||||
import org.nutz.lang.util.ClassMetaReader;
|
||||
import org.nutz.lang.util.Context;
|
||||
import org.nutz.lang.util.MethodParamNamesScaner;
|
||||
import org.nutz.log.Log;
|
||||
import org.nutz.log.Logs;
|
||||
import org.nutz.mvc.Mvcs;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* Created by wizzer on 2016/6/22.
|
||||
*/
|
||||
@IocBean(create = "init", depose = "close")
|
||||
public class SLogService implements Runnable {
|
||||
|
||||
private static final Log log = Logs.get();
|
||||
|
||||
ExecutorService es;
|
||||
|
||||
LinkedBlockingQueue<Sys_log> queue;
|
||||
|
||||
@Inject
|
||||
protected SysLogService sysLogService;
|
||||
|
||||
/**
|
||||
* 异步插入日志
|
||||
*
|
||||
* @param syslog 日志对象
|
||||
*/
|
||||
public void async(Sys_log syslog) {
|
||||
LinkedBlockingQueue<Sys_log> queue = this.queue;
|
||||
if (queue != null)
|
||||
try {
|
||||
boolean re = queue.offer(syslog, 50, TimeUnit.MILLISECONDS);
|
||||
if (!re) {
|
||||
log.info("syslog queue is full, drop it ...");
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 同步插入日志
|
||||
*
|
||||
* @param syslog 日志对象
|
||||
*/
|
||||
public void sync(Sys_log syslog) {
|
||||
try {
|
||||
sysLogService.fastInsertSysLog(syslog);
|
||||
} catch (Throwable e) {
|
||||
log.info("insert syslog sync fail", e);
|
||||
}
|
||||
}
|
||||
|
||||
public void run() {
|
||||
while (true) {
|
||||
LinkedBlockingQueue<Sys_log> queue = this.queue;
|
||||
if (queue == null)
|
||||
break;
|
||||
try {
|
||||
Sys_log sysLog = queue.poll(1, TimeUnit.SECONDS);
|
||||
if (sysLog != null) {
|
||||
sync(sysLog);
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 本方法通常由aop拦截器调用.
|
||||
*
|
||||
* @param t 日志类型
|
||||
* @param tag 标签
|
||||
* @param source 源码位置
|
||||
* @param els 消息模板的EL表达式预处理表
|
||||
* @param param 是否异步插入
|
||||
* @param result 是否异步插入
|
||||
* @param async 是否异步插入
|
||||
* @param args 方法参数
|
||||
* @param re 方法返回值
|
||||
* @param method 方法实例
|
||||
* @param obj 被拦截的对象
|
||||
* @param e 异常对象
|
||||
*/
|
||||
public void log(String t, String type, String tag, String source, CharSegment seg,
|
||||
Map<String, El> els, boolean param, boolean result,
|
||||
boolean async,
|
||||
Object[] args, Object re, Method method, Object obj,
|
||||
Throwable e) {
|
||||
String _msg = null;
|
||||
if (seg.hasKey()) {
|
||||
Context ctx = Lang.context();
|
||||
List<String> names = null;
|
||||
if (Nutz.majorVersion() == 1 && Nutz.minorVersion() < 60) {
|
||||
Class<?> klass = obj.getClass();
|
||||
if (klass.getName().endsWith("$$NUTZAOP"))
|
||||
klass = klass.getSuperclass();
|
||||
String key = klass.getName();
|
||||
if (caches.containsKey(key))
|
||||
names = caches.get(key).get(ClassMetaReader.getKey(method));
|
||||
else {
|
||||
try {
|
||||
Map<String, List<String>> tmp = MethodParamNamesScaner.getParamNames(klass);
|
||||
names = tmp.get(ClassMetaReader.getKey(method));
|
||||
caches.put(key, tmp);
|
||||
} catch (IOException e1) {
|
||||
log.debug("error when reading param name");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
names = MethodParamNamesScaner.getParamNames(method);
|
||||
}
|
||||
if (names != null) {
|
||||
for (int i = 0; i < names.size() && i < args.length; i++) {
|
||||
ctx.set(names.get(i), args[i]);
|
||||
}
|
||||
}
|
||||
ctx.set("obj", obj);
|
||||
ctx.set("args", args);
|
||||
ctx.set("re", re);
|
||||
ctx.set("return", re);
|
||||
ctx.set("req", Mvcs.getReq());
|
||||
ctx.set("resp", Mvcs.getResp());
|
||||
Context _ctx = Lang.context();
|
||||
for (String key : seg.keys()) {
|
||||
_ctx.set(key, els.get(key).eval(ctx));
|
||||
}
|
||||
_msg = seg.render(_ctx).toString();
|
||||
} else {
|
||||
_msg = seg.getOrginalString();
|
||||
}
|
||||
String _param = "";
|
||||
String _result = "";
|
||||
if (param && args != null) {
|
||||
try {
|
||||
_param = Json.toJson(args);
|
||||
} catch (Exception e1) {
|
||||
_param = "传参不能转换为JSON格式";
|
||||
}
|
||||
}
|
||||
if (result && re != null) {
|
||||
try {
|
||||
_result = Json.toJson(re);
|
||||
} catch (Exception e1) {
|
||||
_param = "返回对象不能转换为JSON格式";
|
||||
}
|
||||
}
|
||||
log(type, tag, source, _msg, async, _param, _result);
|
||||
}
|
||||
|
||||
|
||||
public void log(String type, String tag, String source, String msg, boolean async, String param, String result) {
|
||||
Sys_log slog = makeLog(type, tag, source, msg, param, result);
|
||||
if (async)
|
||||
async(slog);
|
||||
else
|
||||
sync(slog);
|
||||
}
|
||||
|
||||
protected static Map<String, Map<String, List<String>>> caches = new HashMap<String, Map<String, List<String>>>();
|
||||
|
||||
public void init() {
|
||||
queue = new LinkedBlockingQueue<Sys_log>();
|
||||
int c = Runtime.getRuntime().availableProcessors();
|
||||
es = Executors.newFixedThreadPool(c);
|
||||
for (int i = 0; i < c; i++) {
|
||||
es.submit(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void close() throws InterruptedException {
|
||||
queue = null; // 触发关闭
|
||||
if (es != null && !es.isShutdown()) {
|
||||
es.shutdown();
|
||||
es.awaitTermination(5, TimeUnit.SECONDS);
|
||||
}
|
||||
}
|
||||
|
||||
public static Sys_log makeLog(String type, String tag, String source, String msg, String param, String result) {
|
||||
Sys_log sysLog = new Sys_log();
|
||||
if (type == null || tag == null) {
|
||||
throw new RuntimeException("type/tag can't null");
|
||||
}
|
||||
if (source == null) {
|
||||
StackTraceElement[] tmp = Thread.currentThread().getStackTrace();
|
||||
if (tmp.length > 2) {
|
||||
source = tmp[2].getClassName() + "#" + tmp[2].getMethodName();
|
||||
} else {
|
||||
source = "main";
|
||||
}
|
||||
|
||||
}
|
||||
sysLog.setType(type);
|
||||
sysLog.setTag(tag);
|
||||
sysLog.setSrc(source);
|
||||
sysLog.setMsg(msg);
|
||||
sysLog.setParam(param);
|
||||
sysLog.setResult(result);
|
||||
if (Mvcs.getReq() != null) {
|
||||
sysLog.setIp(Lang.getIP(Mvcs.getReq()));
|
||||
}
|
||||
sysLog.setCreatedBy(SecurityUtil.getUserId());
|
||||
sysLog.setDelFlag(false);
|
||||
sysLog.setUsername(SecurityUtil.getUserUsername());
|
||||
sysLog.setLoginname(SecurityUtil.getUserLoginname());
|
||||
return sysLog;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package com.budwk.app.base.model;
|
||||
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table("audit")
|
||||
@Comment("审核记录表")
|
||||
@Data
|
||||
public class Audit extends BaseModel {
|
||||
|
||||
@Column
|
||||
@Name
|
||||
@Comment("ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@PrevInsert(uu32 = true)
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("审核人")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@PrevInsert(els = {@EL("$me.uid()")})
|
||||
private String auditor;
|
||||
|
||||
@Column
|
||||
@Comment("是否通过")
|
||||
@ColDefine(type = ColType.BOOLEAN)
|
||||
private Boolean auditPass;
|
||||
|
||||
@Column
|
||||
@Comment("审核时间")
|
||||
@Prev(els = {@EL("$me.nowDate()")})
|
||||
private Date auditTime;
|
||||
|
||||
@Column
|
||||
@Comment("审核意见")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 500)
|
||||
|
||||
private String auditOpinion;
|
||||
@Column
|
||||
@Comment("签字")
|
||||
@ColDefine(type = ColType.TEXT)
|
||||
private String auditSign;
|
||||
|
||||
@Column
|
||||
@Comment("审核人姓名")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
@PrevInsert(els = {@EL("$me.userName()")})
|
||||
private String username;
|
||||
|
||||
@Column
|
||||
@Comment("审核人工号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
@PrevInsert(els = {@EL("$me.loginName()")})
|
||||
private String loginname;
|
||||
|
||||
@Column
|
||||
@Comment("审核类型(1.通过 2.拒绝 3.退回)")
|
||||
@ColDefine(type = ColType.INT)
|
||||
private Integer auditType;
|
||||
|
||||
public Date nowDate() {
|
||||
return new Date();
|
||||
}
|
||||
|
||||
public String uid() {
|
||||
return SecurityUtil.getUserId();
|
||||
}
|
||||
|
||||
public String userName() {
|
||||
return SecurityUtil.getUserUsername();
|
||||
}
|
||||
|
||||
public String loginName() {
|
||||
return SecurityUtil.getUserLoginname();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
package com.budwk.app.base.model;
|
||||
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import lombok.Data;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||
import org.nutz.dao.interceptor.annotation.PrevUpdate;
|
||||
import org.nutz.json.Json;
|
||||
import org.nutz.json.JsonFormat;
|
||||
import org.nutz.lang.Strings;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* Created by wizzer on 2016/6/21.
|
||||
* Update by wizzer on 2021/8/30.
|
||||
*/
|
||||
@Data
|
||||
public abstract class BaseModel implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Column
|
||||
@Comment("创建人")
|
||||
@PrevInsert(els = @EL("$me.createdByUid()"))
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String createdBy;
|
||||
|
||||
/**
|
||||
* Long不要用ColDefine定义,兼容oracle/mysql,支持2038年以后的时间戳
|
||||
* 13位时间戳哦,不再是11位
|
||||
*/
|
||||
@Column
|
||||
@Comment("创建时间")
|
||||
@PrevInsert(now = true)
|
||||
private Long createdAt;
|
||||
|
||||
@Column
|
||||
@Comment("修改人")
|
||||
@PrevInsert(els = @EL("$me.updatedByUid()"))
|
||||
@PrevUpdate(els = @EL("$me.updatedByUid()"))
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String updatedBy;
|
||||
|
||||
/**
|
||||
* Long不要用ColDefine定义,兼容oracle/mysql,支持2038年以后的时间戳
|
||||
* 13位时间戳哦,不再是11位
|
||||
*/
|
||||
@Column
|
||||
@Comment("修改时间")
|
||||
@PrevInsert(now = true)
|
||||
@PrevUpdate(now = true)
|
||||
private Long updatedAt;
|
||||
|
||||
@Column
|
||||
@Comment("删除标记")
|
||||
@PrevInsert(els = @EL("$me.flag()"))
|
||||
@ColDefine(type = ColType.BOOLEAN)
|
||||
private Boolean delFlag;
|
||||
|
||||
public String toJsonString() {
|
||||
return Json.toJson(this, JsonFormat.compact());
|
||||
}
|
||||
|
||||
public Boolean flag() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public String createdByUid() {
|
||||
String uid = getCreatedBy();
|
||||
if (Strings.isNotBlank(uid)) {
|
||||
return uid;
|
||||
}
|
||||
try {
|
||||
return StpUtil.getLoginIdAsString();
|
||||
} catch (Exception e) {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
public String updatedByUid() {
|
||||
String uid = getUpdatedBy();
|
||||
if (Strings.isNotBlank(uid)) {
|
||||
return uid;
|
||||
}
|
||||
try {
|
||||
return StpUtil.getLoginIdAsString();
|
||||
} catch (Exception e) {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.budwk.app.base.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class CustomFormField {
|
||||
|
||||
private String fieldName; // 字段名称
|
||||
private String fieldType; // 字段类型(如 "text", "date", "file" 等)
|
||||
private Boolean required; // 是否必填
|
||||
private Integer maxLength; // 最大字符数(仅适用于文本类型)
|
||||
private String dateRange; // 日期范围(仅适用于日期类型,格式为 "YYYY-MM-DD,YYYY-MM-DD")
|
||||
private List<String> allowedFileTypes; // 允许的文件类型(仅适用于文件类型,如 ["pdf", "jpg"])
|
||||
private Integer maxFiles; // 最大文件数量(仅适用于文件类型)
|
||||
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.budwk.app.base.page;
|
||||
|
||||
import org.nutz.dao.pager.Pager;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 指定偏移量及大小的Pager, 这样就不会受限于原生Pager的offset=(pageNumber-1)*pageSize
|
||||
*
|
||||
* @author wendal
|
||||
*/
|
||||
|
||||
public class OffsetPager extends Pager implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -1385308131663113162L;
|
||||
|
||||
protected int offset = -1;
|
||||
|
||||
protected OffsetPager() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建一个指定偏移量及大小的Pager
|
||||
*
|
||||
* @param offset 偏移量
|
||||
* @param size 数据大小
|
||||
*/
|
||||
public OffsetPager(int offset, int size) {
|
||||
super();
|
||||
this.offset = offset;
|
||||
setPageSize(size);
|
||||
}
|
||||
|
||||
/**
|
||||
* 覆盖超类的计算得到的offset
|
||||
*/
|
||||
public int getOffset() {
|
||||
if (offset > -1)
|
||||
return offset;
|
||||
return super.getOffset();
|
||||
}
|
||||
|
||||
public void setOffset(int offset) {
|
||||
this.offset = offset;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.budwk.app.base.page;
|
||||
|
||||
public interface Paginable {
|
||||
|
||||
/**
|
||||
* 总记录数
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public int getTotalCount();
|
||||
|
||||
/**
|
||||
* 总页数
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public int getTotalPage();
|
||||
|
||||
/**
|
||||
* 每页记录数
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public int getPageSize();
|
||||
|
||||
/**
|
||||
* 当前页号
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public int getPageNo();
|
||||
|
||||
/**
|
||||
* 是否第一页
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean isFirstPage();
|
||||
|
||||
/**
|
||||
* 是否最后一页
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean isLastPage();
|
||||
|
||||
/**
|
||||
* 返回下页的页号
|
||||
*/
|
||||
public int getNextPage();
|
||||
|
||||
/**
|
||||
* 返回上页的页号
|
||||
*/
|
||||
public int getPrePage();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.budwk.app.base.page;
|
||||
|
||||
import org.nutz.lang.Lang;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class Pagination<T> extends SimplePage implements java.io.Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Pagination() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 构造器
|
||||
*
|
||||
* @param pageNo 页码
|
||||
* @param pageSize 每页几条数据
|
||||
* @param totalCount 总共几条数据
|
||||
*/
|
||||
public Pagination(int pageNo, int pageSize, int totalCount) {
|
||||
super(pageNo, pageSize, totalCount);
|
||||
}
|
||||
|
||||
/**
|
||||
* 构造器
|
||||
*
|
||||
* @param pageNo 页码
|
||||
* @param pageSize 每页几条数据
|
||||
* @param totalCount 总共几条数据
|
||||
* @param list 分页内容
|
||||
*/
|
||||
public Pagination(int pageNo, int pageSize, int totalCount, List<T> list) {
|
||||
super(pageNo, pageSize, totalCount);
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 第一条数据位置
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public int getFirstResult() {
|
||||
return (pageNo - 1) * pageSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* 当前页的数据
|
||||
*/
|
||||
private List<T> list;
|
||||
|
||||
/**
|
||||
* 获得分页内容
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public List<T> getList() {
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param classOfT 列表容器內的元素类型
|
||||
* @return
|
||||
*/
|
||||
public List<T> getList(Class<T> classOfT) {
|
||||
return Lang.collection2list(list, classOfT);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 设置分页内容
|
||||
*
|
||||
* @param list
|
||||
*/
|
||||
public void setList(List<T> list) {
|
||||
this.list = list;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,175 @@
|
||||
package com.budwk.app.base.page;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class SimplePage implements java.io.Serializable, Paginable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public static final int DEF_COUNT = 10;
|
||||
private List<Integer> localArrayList = new ArrayList<Integer>();
|
||||
|
||||
public List<Integer> getSegment() {
|
||||
return localArrayList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查页码 checkPageNo
|
||||
*
|
||||
* @param pageNo
|
||||
* @return if pageNo==null or pageNo 小于 1 then return 1 else return pageNo
|
||||
*/
|
||||
public static int cpn(Integer pageNo) {
|
||||
return (pageNo == null || pageNo < 1) ? 1 : pageNo;
|
||||
}
|
||||
|
||||
public SimplePage() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 构造器
|
||||
*
|
||||
* @param pageNo 页码
|
||||
* @param pageSize 每页几条数据
|
||||
* @param totalCount 总共几条数据
|
||||
*/
|
||||
public SimplePage(int pageNo, int pageSize, int totalCount) {
|
||||
setTotalCount(totalCount);
|
||||
setPageSize(pageSize);
|
||||
setPageNo(pageNo);
|
||||
adjustPageNo();
|
||||
int totalPages = getTotalPage();
|
||||
minPage = minPage < 1 ? 1 : minPage;
|
||||
maxPage = maxPage > totalPages ? totalPages : maxPage;
|
||||
for (int i = minPage; i <= maxPage; i++) {
|
||||
localArrayList.add(i);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 调整页码,使不超过最大页数
|
||||
*/
|
||||
public void adjustPageNo() {
|
||||
if (pageNo == 1) {
|
||||
return;
|
||||
}
|
||||
int tp = getTotalPage();
|
||||
if (pageNo > tp) {
|
||||
pageNo = tp;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得页码
|
||||
*/
|
||||
public int getPageNo() {
|
||||
return pageNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 每页几条数据
|
||||
*/
|
||||
public int getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* 总共几条数据
|
||||
*/
|
||||
public int getTotalCount() {
|
||||
return totalCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* 总共几页
|
||||
*/
|
||||
public int getTotalPage() {
|
||||
int totalPage = totalCount / pageSize;
|
||||
if (totalPage == 0 || totalCount % pageSize != 0) {
|
||||
totalPage++;
|
||||
}
|
||||
return totalPage;
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否第一页
|
||||
*/
|
||||
public boolean isFirstPage() {
|
||||
return pageNo <= 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否最后一页
|
||||
*/
|
||||
public boolean isLastPage() {
|
||||
return pageNo >= getTotalPage();
|
||||
}
|
||||
|
||||
/**
|
||||
* 下一页页码
|
||||
*/
|
||||
public int getNextPage() {
|
||||
if (isLastPage()) {
|
||||
return pageNo;
|
||||
} else {
|
||||
return pageNo + 1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 上一页页码
|
||||
*/
|
||||
public int getPrePage() {
|
||||
if (isFirstPage()) {
|
||||
return pageNo;
|
||||
} else {
|
||||
return pageNo - 1;
|
||||
}
|
||||
}
|
||||
|
||||
protected int totalCount = 0;
|
||||
protected int pageSize = 20;
|
||||
protected int pageNo = 1;
|
||||
|
||||
/**
|
||||
* if totalCount 小于 0 then totalCount=0
|
||||
*
|
||||
* @param totalCount
|
||||
*/
|
||||
public void setTotalCount(int totalCount) {
|
||||
if (totalCount < 0) {
|
||||
this.totalCount = 0;
|
||||
} else {
|
||||
this.totalCount = totalCount;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* if pageSize 小于 1 then pageSize=DEF_COUNT
|
||||
*
|
||||
* @param pageSize
|
||||
*/
|
||||
public void setPageSize(int pageSize) {
|
||||
if (pageSize < 1) {
|
||||
this.pageSize = DEF_COUNT;
|
||||
} else {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* if pageNo 小于 1 then pageNo=1
|
||||
*
|
||||
* @param pageNo
|
||||
*/
|
||||
public void setPageNo(int pageNo) {
|
||||
if (pageNo < 1) {
|
||||
this.pageNo = 1;
|
||||
} else {
|
||||
this.pageNo = pageNo;
|
||||
}
|
||||
}
|
||||
|
||||
int minPage = pageNo - (int) Math.floor((pageSize - 1) / 2.0D);
|
||||
int maxPage = pageNo + (int) Math.ceil((pageSize - 1) / 2.0D);
|
||||
int totalPage = getTotalPage();
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.budwk.app.base.page.datatable;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* Created by wizzer on 2016/6/27.
|
||||
*/
|
||||
public class DataTableColumn implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
protected String data;
|
||||
protected String name;
|
||||
protected boolean searchable;
|
||||
protected boolean orderable;
|
||||
|
||||
public String getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(String data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public boolean isSearchable() {
|
||||
return searchable;
|
||||
}
|
||||
|
||||
public void setSearchable(boolean searchable) {
|
||||
this.searchable = searchable;
|
||||
}
|
||||
|
||||
public boolean isOrderable() {
|
||||
return orderable;
|
||||
}
|
||||
|
||||
public void setOrderable(boolean orderable) {
|
||||
this.orderable = orderable;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.budwk.app.base.page.datatable;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* Created by wizzer on 2016/6/27.
|
||||
*/
|
||||
public class DataTableOrder implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
protected int column;
|
||||
protected String dir;
|
||||
|
||||
public int getColumn() {
|
||||
return column;
|
||||
}
|
||||
|
||||
public void setColumn(int column) {
|
||||
this.column = column;
|
||||
}
|
||||
|
||||
public String getDir() {
|
||||
return dir;
|
||||
}
|
||||
|
||||
public void setDir(String dir) {
|
||||
this.dir = dir;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.budwk.app.base.param;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Positive;
|
||||
|
||||
/**
|
||||
* @Digits注解 验证注解的元素值的整数位数和小数位数上限 ,并且类型为float,double,BigDecimal。
|
||||
*/
|
||||
@Data
|
||||
public class PageForm<T> {
|
||||
|
||||
@NotNull(message = "pageNumber不能为空")
|
||||
@Min(value = 1, message = "pageNumber最小为1")
|
||||
@Positive(message = "pageNumber必须是正数")
|
||||
private Integer pageNumber;
|
||||
|
||||
@NotNull(message = "pageSize不能为空")
|
||||
@Max(value = 200, message = "pageSize最大为50")
|
||||
private Integer pageSize;
|
||||
|
||||
private String pageOrderName;
|
||||
|
||||
private String pageOrderBy;
|
||||
|
||||
private String searchName;
|
||||
|
||||
private String searchKeyword;
|
||||
|
||||
private Boolean audit;
|
||||
|
||||
public PageForm defaultSort(String column, String order) {
|
||||
this.setPageOrderName(column);
|
||||
this.setPageOrderBy(order);
|
||||
return this;
|
||||
}
|
||||
|
||||
public PageForm defaultSortAsc(String column) {
|
||||
return this.defaultSort(column, "ascending");
|
||||
}
|
||||
|
||||
public PageForm defaultSortDesc(String column) {
|
||||
return this.defaultSort(column, "descending");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.budwk.app.base.result;
|
||||
|
||||
/**
|
||||
* @author wizzer@qq.com
|
||||
*/
|
||||
public interface IResultCode {
|
||||
int getCode();
|
||||
|
||||
String getMsg();
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
package com.budwk.app.base.result;
|
||||
|
||||
import org.nutz.json.Json;
|
||||
import org.nutz.json.JsonFormat;
|
||||
import org.nutz.lang.Strings;
|
||||
import org.nutz.mvc.Mvcs;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* Created by wizzer on 2016/12/21.
|
||||
*/
|
||||
public class Result implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private int code;
|
||||
private String msg;
|
||||
private Object data;
|
||||
private long time;
|
||||
|
||||
public Result() {
|
||||
this.time = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
public static Result NEW() {
|
||||
return new Result();
|
||||
}
|
||||
|
||||
|
||||
public Result addCode(int code) {
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result addMsg(String msg) {
|
||||
if (Strings.isBlank(msg) || Mvcs.getActionContext() == null || Mvcs.getActionContext().getRequest() == null || Mvcs.getMessage(Mvcs.getActionContext().getRequest(), msg) == null) {
|
||||
this.msg = Strings.sNull(msg);
|
||||
} else {
|
||||
this.msg = Mvcs.getMessage(Mvcs.getActionContext().getRequest(), msg);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result addData(Object data) {
|
||||
this.data = data;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result(int code, String msg, Object data) {
|
||||
this.code = code;
|
||||
if (Strings.isBlank(msg) || Mvcs.getActionContext() == null || Mvcs.getActionContext().getRequest() == null || Mvcs.getMessage(Mvcs.getActionContext().getRequest(), msg) == null) {
|
||||
this.msg = Strings.sNull(msg);
|
||||
} else {
|
||||
this.msg = Mvcs.getMessage(Mvcs.getActionContext().getRequest(), msg);
|
||||
}
|
||||
this.data = data;
|
||||
this.time = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
public static Result success(String content) {
|
||||
return new Result(0, content, null);
|
||||
}
|
||||
|
||||
public static Result success(String content, Object data) {
|
||||
return new Result(0, content, data);
|
||||
}
|
||||
|
||||
public static Result success(Object data) {
|
||||
return new Result(0, "system.success", data);
|
||||
}
|
||||
|
||||
public boolean isSuccess() {
|
||||
return this.code == ResultCode.SUCCESS.code;
|
||||
}
|
||||
|
||||
public static Result error(IResultCode resultCode) {
|
||||
return new Result(resultCode.getCode(), resultCode.getMsg(), null);
|
||||
}
|
||||
|
||||
public static Result error(int code, String content) {
|
||||
return new Result(code, content, null);
|
||||
}
|
||||
|
||||
public static Result error(String content) {
|
||||
return new Result(1, content, null);
|
||||
}
|
||||
|
||||
public static Result success() {
|
||||
return new Result(0, "system.success", null);
|
||||
}
|
||||
|
||||
public static Result error() {
|
||||
return new Result(1, "system.error", null);
|
||||
}
|
||||
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public Object getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public static Result condition(boolean flag) {
|
||||
return flag ? success("system.error") : error("system.error");
|
||||
}
|
||||
|
||||
public String toJsonString() {
|
||||
return Json.toJson(this, JsonFormat.compact());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.budwk.app.base.result;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author wizzer@qq.com
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ResultCode implements IResultCode {
|
||||
SUCCESS(0, "操作成功"),
|
||||
FAILURE(200400, "业务异常"),
|
||||
NOT_FOUND(200404, "服务未找到"),
|
||||
TOO_MANY_REQUESTS(200429, "请求次数过多"),
|
||||
SERVER_ERROR(200500, "服务异常"),
|
||||
IOC_ERROR(500000, "IOC对象加载异常"),
|
||||
NULL_DATA_ERROR(500100, "数据不存在"),
|
||||
HAVE_DATA_ERROR(500110, "数据已存在"),
|
||||
PARAM_ERROR(500200, "参数错误"),
|
||||
XSS_SQL_ERROR(500300, "传参被拦截"),
|
||||
BLACKLIST_ERROR(500400, "IP黑名单"),
|
||||
DAO_ERROR(500600, "DAO数据库查询错误"),
|
||||
DEMO_ERROR(500700, "演示环境,限制操作"),
|
||||
|
||||
PARAM_VALID_ERROR(500800, "请求参数校验异常"),
|
||||
|
||||
USER_NOT_LOGIN(600098, "用户未登录"),
|
||||
USER_NOT_ROLE(600099, "无此角色"),
|
||||
USER_NOT_PERMISSION(600100, "无此权限"),
|
||||
USER_NOT_FOUND(600101, "用户不存在"),
|
||||
USER_DISABLED(600102, "用户被禁用"),
|
||||
USER_LOCKED(600103, "用户已锁定"),
|
||||
USER_NAME_ERROR(600104, "用户名错误"),
|
||||
USER_PWD_ERROR(600105, "用户密码错误"),
|
||||
USER_PWD_EXPIRED(600106, "用户密码过期"),
|
||||
USER_VERIFY_ERROR(600107, "验证码错误"),
|
||||
USER_LOGIN_FAIL(600108, "用户登录失败");
|
||||
|
||||
final int code;
|
||||
final String msg;
|
||||
}
|
||||
@@ -0,0 +1,953 @@
|
||||
package com.budwk.app.base.service;
|
||||
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.page.datatable.DataTableColumn;
|
||||
import com.budwk.app.base.page.datatable.DataTableOrder;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import org.nutz.dao.*;
|
||||
import org.nutz.dao.entity.Entity;
|
||||
import org.nutz.dao.entity.Record;
|
||||
import org.nutz.dao.pager.Pager;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Created by wizzer on 2016/12/22.
|
||||
*/
|
||||
public interface BaseService<T> {
|
||||
|
||||
Dao dao();
|
||||
|
||||
/**
|
||||
* 获取实体的Entity
|
||||
*
|
||||
* @return 实体的Entity
|
||||
*/
|
||||
Entity<T> getEntity();
|
||||
|
||||
/**
|
||||
* 获取实体类型
|
||||
*
|
||||
* @return 实体类型
|
||||
*/
|
||||
Class<T> getEntityClass();
|
||||
|
||||
/**
|
||||
* 统计符合条件的对象表条数
|
||||
*
|
||||
* @param cnd
|
||||
* @return
|
||||
*/
|
||||
int count(Condition cnd);
|
||||
|
||||
/**
|
||||
* 统计对象表条数
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
int count();
|
||||
|
||||
/**
|
||||
* 统计符合条件的记录条数
|
||||
*
|
||||
* @param tableName
|
||||
* @param cnd
|
||||
* @return
|
||||
*/
|
||||
int count(String tableName, Condition cnd);
|
||||
|
||||
/**
|
||||
* 统计表记录条数
|
||||
*
|
||||
* @param tableName
|
||||
* @return
|
||||
*/
|
||||
int count(String tableName);
|
||||
|
||||
/**
|
||||
* 自定义SQL统计
|
||||
*
|
||||
* @param sql
|
||||
* @return
|
||||
*/
|
||||
int count(Sql sql);
|
||||
|
||||
/**
|
||||
* 通过数字型主键查询对象
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
T fetch(long id);
|
||||
|
||||
/**
|
||||
* 自定义SQL查询VO对象
|
||||
* @param sql
|
||||
* @param clazz
|
||||
* @return 味大无需多盐
|
||||
* @param <C>
|
||||
*/
|
||||
<C> C fetchVO(Sql sql, Class<C> clazz);
|
||||
|
||||
/**
|
||||
* 通过字符型主键查询对象
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
T fetch(String id);
|
||||
|
||||
/**
|
||||
* 查询关联表
|
||||
*
|
||||
* @param obj 数据对象,可以是普通对象或集合,但不是类
|
||||
* @param regex 为null查询全部,支持通配符 ^(a|b)$
|
||||
* @return
|
||||
*/
|
||||
<T> T fetchLinks(T obj, String regex);
|
||||
|
||||
/**
|
||||
* 查询关联表
|
||||
*
|
||||
* @param obj 数据对象,可以是普通对象或集合,但不是类
|
||||
* @param regex 为null查询全部,支持通配符 ^(a|b)$
|
||||
* @param cnd 关联字段的过滤(排序,条件语句,分页等)
|
||||
* @return
|
||||
*/
|
||||
<T> T fetchLinks(T obj, String regex, Condition cnd);
|
||||
|
||||
|
||||
/**
|
||||
* 查出符合条件的第一条记录
|
||||
*
|
||||
* @param cnd 查询条件
|
||||
* @return 实体, 如不存在则为null
|
||||
*/
|
||||
T fetch(Condition cnd);
|
||||
|
||||
/**
|
||||
* 复合主键专用
|
||||
*
|
||||
* @param pks 键值
|
||||
* @return 对象 T
|
||||
*/
|
||||
T fetchx(Object... pks);
|
||||
|
||||
/**
|
||||
* 复合主键专用
|
||||
*
|
||||
* @param pks 键值
|
||||
* @return 对象 T
|
||||
*/
|
||||
boolean exists(Object... pks);
|
||||
|
||||
/**
|
||||
* 将一个对象插入到一个数据库
|
||||
*
|
||||
* @param obj 要被插入的对象
|
||||
* 它可以是:
|
||||
* 普通 POJO
|
||||
* 集合
|
||||
* 数组
|
||||
* Map
|
||||
* 注意:如果是集合,数组或者 Map,所有的对象必须类型相同,否则可能会出错
|
||||
* @return 插入后的对象
|
||||
*/
|
||||
<T> T insert(T obj);
|
||||
|
||||
/**
|
||||
* 将一个对象按FieldFilter过滤后,插入到一个数据源。
|
||||
* <p>
|
||||
* <code>dao.insert(pet, FieldFilter.create(Pet.class, FieldMatcher.create(false)));</code>
|
||||
*
|
||||
* @param obj 要被插入的对象
|
||||
* @param filter 字段过滤器, 其中FieldMatcher.isIgnoreId生效
|
||||
* @return 插入后的对象
|
||||
* @see Dao#insert(Object)
|
||||
*/
|
||||
<T> T insert(T obj, FieldFilter filter);
|
||||
|
||||
/**
|
||||
* 根据对象的主键(@Id/@Name/@Pk)先查询, 如果存在就更新, 不存在就插入
|
||||
*
|
||||
* @param obj 对象
|
||||
* @return 原对象
|
||||
*/
|
||||
<T> T insertOrUpdate(T obj);
|
||||
|
||||
/**
|
||||
* 根据对象的主键(@Id/@Name/@Pk)先查询, 如果存在就更新, 不存在就插入
|
||||
*
|
||||
* @param obj 对象
|
||||
* @param insertFieldFilter 插入时的字段过滤, 可以是null
|
||||
* @param updateFieldFilter 更新时的字段过滤,可以是null
|
||||
* @return 原对象
|
||||
*/
|
||||
<T> T insertOrUpdate(T obj, FieldFilter insertFieldFilter, FieldFilter updateFieldFilter);
|
||||
|
||||
/**
|
||||
* 自由的向一个数据表插入一条数据
|
||||
*
|
||||
* @param tableName 表名
|
||||
* @param chain 数据名值链
|
||||
*/
|
||||
void insert(String tableName, Chain chain);
|
||||
|
||||
/**
|
||||
* 快速插入一个对象,对象的 '@Prev' 以及 '@Next' 在这个函数里不起作用
|
||||
*
|
||||
* @param obj
|
||||
* @return
|
||||
*/
|
||||
<T> T fastInsert(T obj);
|
||||
|
||||
/**
|
||||
* 将对象插入数据库同时,也将符合一个正则表达式的所有关联字段关联的对象统统插入相应的数据库
|
||||
* <p>
|
||||
* 关于关联字段更多信息,请参看 '@One' | '@Many' | '@ManyMany' 更多的描述
|
||||
*
|
||||
* @param obj 数据对象
|
||||
* @param regex 正则表达式,描述了什么样的关联字段将被关注。如果为 null,则表示全部的关联字段都会被插入
|
||||
* @return 数据对象本身
|
||||
* @see org.nutz.dao.entity.annotation.One
|
||||
* @see org.nutz.dao.entity.annotation.Many
|
||||
* @see org.nutz.dao.entity.annotation.ManyMany
|
||||
*/
|
||||
<T> T insertWith(T obj, String regex);
|
||||
|
||||
/**
|
||||
* 根据一个正则表达式,仅将对象所有的关联字段插入到数据库中,并不包括对象本身
|
||||
*
|
||||
* @param obj 数据对象
|
||||
* @param regex 正则表达式,描述了什么样的关联字段将被关注。如果为 null,则表示全部的关联字段都会被插入
|
||||
* @return 数据对象本身
|
||||
* @see org.nutz.dao.entity.annotation.One
|
||||
* @see org.nutz.dao.entity.annotation.Many
|
||||
* @see org.nutz.dao.entity.annotation.ManyMany
|
||||
*/
|
||||
<T> T insertLinks(T obj, String regex);
|
||||
|
||||
/**
|
||||
* 将对象的一个或者多个,多对多的关联信息,插入数据表
|
||||
*
|
||||
* @param obj 对象
|
||||
* @param regex 正则表达式,描述了那种多对多关联字段将被执行该操作
|
||||
* @return 对象自身
|
||||
* @see org.nutz.dao.entity.annotation.ManyMany
|
||||
*/
|
||||
<T> T insertRelation(T obj, String regex);
|
||||
|
||||
/**
|
||||
* 更新数据
|
||||
*
|
||||
* @param obj
|
||||
* @return
|
||||
*/
|
||||
int update(Object obj);
|
||||
|
||||
/**
|
||||
* 更新数据忽略值为null的字段
|
||||
*
|
||||
* @param obj
|
||||
* @return
|
||||
*/
|
||||
int updateIgnoreNull(Object obj);
|
||||
|
||||
/**
|
||||
* 部分更新实体表
|
||||
*
|
||||
* @param chain
|
||||
* @param cnd
|
||||
* @return
|
||||
*/
|
||||
int update(Chain chain, Condition cnd);
|
||||
|
||||
/**
|
||||
* 部分更新表
|
||||
*
|
||||
* @param tableName
|
||||
* @param chain
|
||||
* @param cnd
|
||||
* @return
|
||||
*/
|
||||
int update(String tableName, Chain chain, Condition cnd);
|
||||
|
||||
/**
|
||||
* 将对象更新的同时,也将符合一个正则表达式的所有关联字段关联的对象统统更新
|
||||
* <p>
|
||||
* 关于关联字段更多信息,请参看 '@One' | '@Many' | '@ManyMany' 更多的描述
|
||||
*
|
||||
* @param obj 数据对象
|
||||
* @param regex 正则表达式,描述了什么样的关联字段将被关注。如果为 null,则表示全部的关联字段都会被更新
|
||||
* @return 数据对象本身
|
||||
* @see org.nutz.dao.entity.annotation.One
|
||||
* @see org.nutz.dao.entity.annotation.Many
|
||||
* @see org.nutz.dao.entity.annotation.ManyMany
|
||||
*/
|
||||
<T> T updateWith(T obj, String regex);
|
||||
|
||||
/**
|
||||
* 根据一个正则表达式,仅更新对象所有的关联字段,并不包括对象本身
|
||||
*
|
||||
* @param obj 数据对象
|
||||
* @param regex 正则表达式,描述了什么样的关联字段将被关注。如果为 null,则表示全部的关联字段都会被更新
|
||||
* @return 数据对象本身
|
||||
* @see org.nutz.dao.entity.annotation.One
|
||||
* @see org.nutz.dao.entity.annotation.Many
|
||||
* @see org.nutz.dao.entity.annotation.ManyMany
|
||||
*/
|
||||
<T> T updateLinks(T obj, String regex);
|
||||
|
||||
/**
|
||||
* 多对多关联是通过一个中间表将两条数据表记录关联起来。
|
||||
* <p>
|
||||
* 而这个中间表可能还有其他的字段,比如描述关联的权重等
|
||||
* <p>
|
||||
* 这个操作可以让你一次更新某一个对象中多个多对多关联的数据
|
||||
*
|
||||
* @param classOfT 对象类型
|
||||
* @param regex 正则表达式,描述了那种多对多关联字段将被执行该操作
|
||||
* @param chain 针对中间关联表的名值链。
|
||||
* @param cnd 针对中间关联表的 WHERE 条件
|
||||
* @return 共有多少条数据被更新
|
||||
* @see org.nutz.dao.entity.annotation.ManyMany
|
||||
*/
|
||||
int updateRelation(Class<?> classOfT, String regex, Chain chain, Condition cnd);
|
||||
|
||||
/**
|
||||
* 基于版本的更新,版本不一样无法更新到数据
|
||||
*
|
||||
* @param obj 需要更新的对象, 必须有version属性
|
||||
* @return 若更新成功, 大于0, 否则小于0
|
||||
*/
|
||||
int updateWithVersion(Object obj);
|
||||
|
||||
/**
|
||||
* 基于版本的更新,版本不一样无法更新到数据
|
||||
*
|
||||
* @param obj 需要更新的对象, 必须有version属性
|
||||
* @param filter 需要过滤的字段设置
|
||||
* @return 若更新成功, 大于0, 否则小于0
|
||||
*/
|
||||
int updateWithVersion(Object obj, FieldFilter filter);
|
||||
|
||||
/**
|
||||
* 乐观锁, 以特定字段的值作为限制条件,更新对象,并自增该字段.
|
||||
* <p>
|
||||
* 执行的sql如下:
|
||||
* <p>
|
||||
* <code>update t_user set age=30, city="广州", version=version+1 where name="wendal" and version=124;</code>
|
||||
*
|
||||
* @param obj 需要更新的对象, 必须带@Id/@Name/@Pk中的其中一种.
|
||||
* @param fieldFilter 需要过滤的属性. 若设置了哪些字段不更新,那务必确保过滤掉fieldName的字段
|
||||
* @param fieldName 参考字段的Java属性名.默认是"version",可以是任意数值字段
|
||||
* @return 若更新成功, 返回值大于0, 否则小于等于0
|
||||
*/
|
||||
int updateAndIncrIfMatch(Object obj, FieldFilter fieldFilter, String fieldName);
|
||||
|
||||
/**
|
||||
* 获取某个对象,最大的 ID 值,这个对象必须声明了 '@Id'
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
int getMaxId();
|
||||
|
||||
/**
|
||||
* 通过long主键删除数据
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
int delete(long id);
|
||||
|
||||
/**
|
||||
* 通过int主键删除数据
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
int delete(int id);
|
||||
|
||||
/**
|
||||
* 通过string主键删除数据
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
int delete(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
*/
|
||||
void delete(Integer[] ids);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
*/
|
||||
void delete(Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
*/
|
||||
void delete(String[] ids);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
*/
|
||||
void delete(List<String> ids);
|
||||
|
||||
/**
|
||||
* 清空表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
int clear();
|
||||
|
||||
/**
|
||||
* 清空表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
int clear(String tableName);
|
||||
|
||||
/**
|
||||
* 按条件清除一组数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
int clear(Condition cnd);
|
||||
|
||||
/**
|
||||
* 按条件清除一组数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
int clear(String tableName, Condition cnd);
|
||||
|
||||
/**
|
||||
* 伪删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
int vDelete(String id);
|
||||
|
||||
/**
|
||||
* 批量伪删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
int vDelete(String[] ids);
|
||||
|
||||
/**
|
||||
* 批量伪删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
int vDelete(List<String> ids);
|
||||
|
||||
/**
|
||||
* 根据条件进行伪删除
|
||||
*
|
||||
* @param cnd
|
||||
* @return
|
||||
*/
|
||||
int vDelete(Condition cnd);
|
||||
|
||||
/**
|
||||
* 根据条件进行伪删除
|
||||
*
|
||||
* @param cnd
|
||||
* @return
|
||||
*/
|
||||
int vDelete(String tableName, Condition cnd);
|
||||
|
||||
/**
|
||||
* 通过LONG主键获取部分字段值
|
||||
*
|
||||
* @param fieldName
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
T getField(String fieldName, long id);
|
||||
|
||||
/**
|
||||
* 通过INT主键获取部分字段值
|
||||
*
|
||||
* @param fieldName
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
T getField(String fieldName, int id);
|
||||
|
||||
/**
|
||||
* 通过NAME主键获取部分字段值
|
||||
*
|
||||
* @param fieldName 支持通配符 ^(a|b)$
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
T getField(String fieldName, String name);
|
||||
|
||||
/**
|
||||
* 通过条件获取部分字段值
|
||||
*
|
||||
* @param fieldName 支持通配符 ^(a|b)$
|
||||
* @param cnd
|
||||
* @return
|
||||
*/
|
||||
T getField(String fieldName, Condition cnd);
|
||||
|
||||
/**
|
||||
* 查询获取部分字段
|
||||
*
|
||||
* @param fieldName 支持通配符 ^(a|b)$
|
||||
* @param cnd
|
||||
* @return
|
||||
*/
|
||||
List<T> query(String fieldName, Condition cnd);
|
||||
|
||||
/**
|
||||
* 查询一组对象。你可以为这次查询设定条件
|
||||
*
|
||||
* @param cnd WHERE 条件。如果为 null,将获取全部数据,顺序为数据库原生顺序<br>
|
||||
* 只有在调用这个函数的时候, cnd.limit 才会生效
|
||||
* @return 对象列表
|
||||
*/
|
||||
List<T> query(Condition cnd);
|
||||
|
||||
/**
|
||||
* 获取全部数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<T> query();
|
||||
|
||||
/**
|
||||
* @param cnd 查询条件
|
||||
* @param linkName 关联字段,支持正则 ^(a|b)$
|
||||
* @return
|
||||
*/
|
||||
List<T> query(Condition cnd, String linkName);
|
||||
|
||||
/**
|
||||
* 获取表及关联表全部数据(支持子查询)
|
||||
*
|
||||
* @param cnd 查询条件
|
||||
* @param linkName 关联字段,支持正则 ^(a|b)$
|
||||
* @param linkCnd 关联条件
|
||||
* @return
|
||||
*/
|
||||
List<T> query(Condition cnd, String linkName, Condition linkCnd);
|
||||
|
||||
/**
|
||||
* 获取表及关联表全部数据
|
||||
*
|
||||
* @param linkName 关联字段,支持正则 ^(a|b)$
|
||||
* @return
|
||||
*/
|
||||
List<T> query(String linkName);
|
||||
|
||||
/**
|
||||
* 分页关联字段查询
|
||||
*
|
||||
* @param cnd 查询条件
|
||||
* @param linkName 关联字段,支持正则 ^(a|b)$
|
||||
* @param pager 分页对象
|
||||
* @return
|
||||
*/
|
||||
List<T> query(Condition cnd, String linkName, Pager pager);
|
||||
|
||||
/**
|
||||
* 分页关联字段查询(支持关联条件)
|
||||
*
|
||||
* @param cnd 查询条件
|
||||
* @param linkName 关联字段,支持正则 ^(a|b)$
|
||||
* @param linkCnd 关联条件
|
||||
* @param pager 分页对象
|
||||
* @return
|
||||
*/
|
||||
List<T> query(Condition cnd, String linkName, Condition linkCnd, Pager pager);
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param cnd 查询条件
|
||||
* @param pager 分页对象
|
||||
* @return
|
||||
*/
|
||||
List<T> query(Condition cnd, Pager pager);
|
||||
|
||||
/**
|
||||
* 查询获取NutMap对象
|
||||
*
|
||||
* @param keyColumnName 作为key的字段名
|
||||
* @param valueColumnName 作为value的字段名
|
||||
* @param cnd 查询条件
|
||||
* @return
|
||||
*/
|
||||
NutMap query(String keyColumnName, String valueColumnName, Condition cnd);
|
||||
|
||||
/**
|
||||
* 查询获取NutMap对象
|
||||
*
|
||||
* @param tableName 表名
|
||||
* @param keyColumnName 作为key的字段名
|
||||
* @param valueColumnName 作为value的字段名
|
||||
* @param cnd 查询条件
|
||||
* @return
|
||||
*/
|
||||
NutMap query(String tableName, String keyColumnName, String valueColumnName, Condition cnd);
|
||||
|
||||
/**
|
||||
* 计算子节点TREEID
|
||||
*
|
||||
* @param tableName
|
||||
* @param colName
|
||||
* @param value
|
||||
* @return
|
||||
*/
|
||||
String getSubPath(String tableName, String colName, String value);
|
||||
|
||||
/**
|
||||
* 获取TREEID父级
|
||||
*
|
||||
* @param path
|
||||
* @return
|
||||
*/
|
||||
String getParentPath(String path);
|
||||
|
||||
|
||||
/**
|
||||
* 执行一条自定义SQL
|
||||
*
|
||||
* @param sql
|
||||
* @return
|
||||
*/
|
||||
Sql execute(Sql sql);
|
||||
|
||||
/**
|
||||
* 自定义SQL返回Record记录集,Record是个MAP但不区分大小写
|
||||
* 别返回Map对象,因为MySql和Oracle中字段名有大小写之分
|
||||
*
|
||||
* @param sql
|
||||
* @return
|
||||
*/
|
||||
List<Record> list(Sql sql);
|
||||
|
||||
/**
|
||||
* 自定义SQL返回NutMap记录集,区分大小写
|
||||
*
|
||||
* @param sql
|
||||
* @return
|
||||
*/
|
||||
List<NutMap> listMap(Sql sql);
|
||||
|
||||
/**
|
||||
* 自定义sql 返回自定义类型
|
||||
*
|
||||
* @param sql
|
||||
* @return
|
||||
*/
|
||||
<C> List<C> listVO(Sql sql, Class<C> clazz);
|
||||
|
||||
/**
|
||||
* 自定义分页sql 返回自定义类型
|
||||
*
|
||||
* @param sql
|
||||
* @return
|
||||
*/
|
||||
<C> Pagination<C> listPageVO(PageForm pageForm, Sql sql, Class<C> clazz);
|
||||
|
||||
|
||||
/**
|
||||
* 自定义查询,并返回当前实体类对象
|
||||
*
|
||||
* @param sql
|
||||
* @return
|
||||
*/
|
||||
List<T> listEntity(Sql sql);
|
||||
|
||||
/**
|
||||
* 自定义sql获取map key-value
|
||||
*
|
||||
* @param sql
|
||||
* @return
|
||||
*/
|
||||
Map getMap(Sql sql);
|
||||
|
||||
/**
|
||||
* 自定义sql获取NutMap key-value
|
||||
*
|
||||
* @param sql
|
||||
* @return
|
||||
*/
|
||||
NutMap getNutMap(Sql sql);
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param pageNumber
|
||||
* @param cnd
|
||||
* @return
|
||||
*/
|
||||
Pagination listPage(Integer pageNumber, Condition cnd);
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param pageNumber
|
||||
* @param sql
|
||||
* @return
|
||||
*/
|
||||
Pagination listPage(Integer pageNumber, Sql sql);
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询(sql)
|
||||
*
|
||||
* @param pageNumber
|
||||
* @param pageSize
|
||||
* @param sql
|
||||
* @return
|
||||
*/
|
||||
Pagination listPage(Integer pageNumber, int pageSize, Sql sql);
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param pageNumber
|
||||
* @param sql 查询语句
|
||||
* @param countSql 统计语句
|
||||
* @return
|
||||
*/
|
||||
Pagination listPage(Integer pageNumber, Sql sql, Sql countSql);
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param pageNumber
|
||||
* @param pageSize
|
||||
* @param sql 查询语句
|
||||
* @param countSql 统计语句
|
||||
* @return
|
||||
*/
|
||||
Pagination listPage(Integer pageNumber, int pageSize, Sql sql, Sql countSql);
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param pageNumber
|
||||
* @param sql
|
||||
* @return
|
||||
*/
|
||||
Pagination listPageMap(Integer pageNumber, Sql sql);
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询(sql)
|
||||
*
|
||||
* @param pageNumber
|
||||
* @param pageSize
|
||||
* @param sql
|
||||
* @return
|
||||
*/
|
||||
Pagination listPageMap(Integer pageNumber, int pageSize, Sql sql);
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param pageNumber
|
||||
* @param sql 查询语句
|
||||
* @param countSql 统计语句
|
||||
* @return
|
||||
*/
|
||||
Pagination listPageMap(Integer pageNumber, Sql sql, Sql countSql);
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param pageNumber
|
||||
* @param pageSize
|
||||
* @param sql 查询语句
|
||||
* @param countSql 统计语句
|
||||
* @return
|
||||
*/
|
||||
Pagination listPageMap(Integer pageNumber, int pageSize, Sql sql, Sql countSql);
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param pageNumber
|
||||
* @param tableName
|
||||
* @param cnd
|
||||
* @return
|
||||
*/
|
||||
Pagination listPage(Integer pageNumber, String tableName, Condition cnd);
|
||||
|
||||
/**
|
||||
* 分页查询(cnd)
|
||||
*
|
||||
* @param pageNumber
|
||||
* @param pageSize
|
||||
* @param cnd
|
||||
* @return
|
||||
*/
|
||||
Pagination listPage(Integer pageNumber, int pageSize, Condition cnd);
|
||||
|
||||
/**
|
||||
* 分页 只要你的class是实体类 就是标注了@Table 就可以不写service 直接用这个
|
||||
*
|
||||
* @param pageNumber
|
||||
* @param pageSize
|
||||
* @param clazz
|
||||
* @param cnd
|
||||
* @param <C>
|
||||
* @return
|
||||
*/
|
||||
<C> Pagination<C> listPage(Integer pageNumber, int pageSize, Class<C> clazz, Condition cnd);
|
||||
|
||||
/**
|
||||
* 分页查询,获取部分字段(cnd)
|
||||
*
|
||||
* @param pageNumber
|
||||
* @param pageSize
|
||||
* @param cnd
|
||||
* @param fieldName 支持通配符 ^(a|b)$
|
||||
* @return
|
||||
*/
|
||||
Pagination listPage(Integer pageNumber, int pageSize, Condition cnd, String fieldName);
|
||||
|
||||
/**
|
||||
* 关联查询
|
||||
*
|
||||
* @param pageNumber
|
||||
* @param pageSize
|
||||
* @param cnd
|
||||
* @param linkName 支持通配符 ^(a|b)$
|
||||
* @return
|
||||
*/
|
||||
Pagination listPageLinks(Integer pageNumber, int pageSize, Condition cnd, String linkName);
|
||||
|
||||
/**
|
||||
* 关联查询,带子查询条件
|
||||
*
|
||||
* @param pageNumber
|
||||
* @param pageSize
|
||||
* @param cnd
|
||||
* @param linkName 支持通配符 ^(a|b)$
|
||||
* @param subCnd 子查询条件
|
||||
* @return
|
||||
*/
|
||||
Pagination listPageLinks(Integer pageNumber, int pageSize, Condition cnd, String linkName, Condition subCnd);
|
||||
|
||||
/**
|
||||
* 分页查询(tabelName)
|
||||
*
|
||||
* @param pageNumber
|
||||
* @param pageSize
|
||||
* @param tableName
|
||||
* @param cnd
|
||||
* @return
|
||||
*/
|
||||
Pagination listPage(Integer pageNumber, int pageSize, String tableName, Condition cnd);
|
||||
|
||||
/**
|
||||
* 分页查询并返回包含实体类内容的NutMap对象
|
||||
*
|
||||
* @param pageNumber
|
||||
* @param cnd
|
||||
* @return
|
||||
*/
|
||||
Pagination listPageMap(Integer pageNumber, Condition cnd);
|
||||
|
||||
/**
|
||||
* 分页查询并返回包含实体类内容的NutMap对象
|
||||
*
|
||||
* @param pageNumber
|
||||
* @param pageSize
|
||||
* @param cnd
|
||||
* @return
|
||||
*/
|
||||
Pagination listPageMap(Integer pageNumber, int pageSize, Condition cnd);
|
||||
|
||||
|
||||
/**
|
||||
* DataTable Page
|
||||
*
|
||||
* @param length 页大小
|
||||
* @param start start
|
||||
* @param draw draw
|
||||
* @param orders 排序
|
||||
* @param columns 字段
|
||||
* @param cnd 查询条件
|
||||
* @param linkName 关联查询 支持通配符 ^(a|b)$
|
||||
* @return
|
||||
*/
|
||||
NutMap data(int length, int start, int draw, List<DataTableOrder> orders, List<DataTableColumn> columns, Cnd cnd, String linkName);
|
||||
|
||||
/**
|
||||
* DataTable Page
|
||||
*
|
||||
* @param length 页大小
|
||||
* @param start start
|
||||
* @param draw draw
|
||||
* @param orders 排序
|
||||
* @param columns 字段
|
||||
* @param cnd 查询条件
|
||||
* @param linkName 关联查询 支持通配符 ^(a|b)$
|
||||
* @param subCnd 关联查询条件
|
||||
* @return
|
||||
*/
|
||||
NutMap data(int length, int start, int draw, List<DataTableOrder> orders, List<DataTableColumn> columns, Cnd cnd, String linkName, Cnd subCnd);
|
||||
|
||||
/**
|
||||
* DataTable Page 自定义SQL
|
||||
*
|
||||
* @param length 页大小
|
||||
* @param start start
|
||||
* @param draw draw
|
||||
* @param countSql 统计查询语句
|
||||
* @param orderSql 结果查询语句
|
||||
* @return
|
||||
*/
|
||||
NutMap data(int length, int start, int draw, Sql countSql, Sql orderSql);
|
||||
|
||||
/**
|
||||
* DataTable Page 自定义SQL
|
||||
*
|
||||
* @param length 页大小
|
||||
* @param start start
|
||||
* @param draw draw
|
||||
* @param countSql 统计查询语句
|
||||
* @param orderSql 结果查询语句
|
||||
* @param countOnly 统计查询语句是否只有count()
|
||||
* @return
|
||||
*/
|
||||
NutMap data(int length, int start, int draw, Sql countSql, Sql orderSql, boolean countOnly);
|
||||
|
||||
/**
|
||||
* DataTable Page
|
||||
*
|
||||
* @param length 页大小
|
||||
* @param start start
|
||||
* @param draw draw
|
||||
* @param cnd 查询条件
|
||||
* @param linkName 关联查询 支持通配符 ^(a|b)$
|
||||
* @return
|
||||
*/
|
||||
NutMap data(int length, int start, int draw, Cnd cnd, String linkName);
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,39 @@
|
||||
package com.budwk.app.base.sms;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface SmsService {
|
||||
|
||||
/**
|
||||
* 单发
|
||||
* @param loginName 工号
|
||||
* @param content 内容
|
||||
*/
|
||||
void send(String loginName, String content);
|
||||
|
||||
/**
|
||||
* 单发
|
||||
* @param loginName 工号
|
||||
* @param title 标题
|
||||
* @param content 内容
|
||||
*/
|
||||
void send(String loginName, String title, String content);
|
||||
|
||||
/**
|
||||
* 单发
|
||||
* @param loginName 工号
|
||||
* @param title 标题
|
||||
* @param content 内容
|
||||
* @param link 链接
|
||||
*/
|
||||
void send(String loginName, String title, String content, String link);
|
||||
|
||||
/**
|
||||
* 群发 多人接收内容相同时使用该方法
|
||||
* @param loginNames 工号
|
||||
* @param title 标题
|
||||
* @param content 内容
|
||||
* @param link 链接
|
||||
*/
|
||||
void massSend(List<String> loginNames, String title, String content, String link);
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.budwk.app.base.sms.impl.njupt;
|
||||
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.sms.SmsService;
|
||||
import com.budwk.app.base.sms.impl.njupt.ucp.serv.MessageSender;
|
||||
import com.budwk.app.base.sms.impl.njupt.ucp.serv.client.*;
|
||||
import com.budwk.app.base.sms.impl.njupt.ucp.ws.util.TokenBuilder;
|
||||
import com.budwk.app.web.commons.base.Globals;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.json.Json;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 南邮短信实现
|
||||
* channeIds 短信、邮箱、及时消息(1,2,3)
|
||||
*/
|
||||
@IocBean
|
||||
@Slf4j
|
||||
public class SmsNjuptServiceImpl implements SmsService {
|
||||
@Override
|
||||
public void send(String loginName, String content) {
|
||||
Address[] address = new Address[]{
|
||||
new Address("(" + loginName + ")", "uc_ux")
|
||||
};
|
||||
Message message = builder(address, null, content, null);
|
||||
send(message);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void send(String loginName, String title, String content) {
|
||||
Address[] address = new Address[]{
|
||||
new Address("(" + loginName + ")", "uc_ux")
|
||||
};
|
||||
Message message = builder(address, title, content, null);
|
||||
send(message);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void send(String loginName, String title, String content, String link) {
|
||||
Address[] address = new Address[]{
|
||||
new Address("(" + loginName + ")", "uc_ux")
|
||||
};
|
||||
Message message = builder(address, title, content, link);
|
||||
send(message);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void massSend(List<String> loginNames, String title, String content, String link) {
|
||||
// List<Address> sms = loginNames.stream().map(loginName -> new Address(loginName, "sms")).toList();
|
||||
List<Address> sms = loginNames.stream().map(loginName -> new Address("(" + loginName + ")", "uc_ux")).toList();
|
||||
Address[] addresses = ArrayUtil.toArray(sms, Address.class);
|
||||
Message message = builder(addresses, title, content, link);
|
||||
send(message);
|
||||
}
|
||||
|
||||
private void send(Message message) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
private Message builder(Address[] address, String title, String content, String linkUrl) {
|
||||
Message message = new Message();
|
||||
message.setTo(address); //接收人地址
|
||||
message.setSubject(title); //标题
|
||||
message.setContent(content); //内容
|
||||
message.setMsgType(StrUtil.isNotBlank(linkUrl) ? 1 : 0); //是否有链接
|
||||
MessagePropertiesEntry signature = buildProperty("smsSignature", ""); //用户签名
|
||||
MessagePropertiesEntry innermsg = buildProperty("innerMsg", "true"); //支持站内信
|
||||
MessagePropertiesEntry imLinkUrl = buildProperty("im_linkUrl", linkUrl);//短信中的链接
|
||||
MessagePropertiesEntry[] entrys = StrUtil.isNotBlank(linkUrl) ? new MessagePropertiesEntry[]{signature, innermsg, imLinkUrl} : new MessagePropertiesEntry[]{signature, innermsg};
|
||||
message.setProperties(new MessageProperties(entrys));
|
||||
return message;
|
||||
}
|
||||
|
||||
private MessagePropertiesEntry buildProperty(String key, String value) {
|
||||
return new MessagePropertiesEntry(key, value);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.serv;
|
||||
|
||||
import com.budwk.app.base.sms.impl.njupt.ucp.serv.client.UcpWebServ_PortType;
|
||||
import com.budwk.app.base.sms.impl.njupt.ucp.serv.client.UcpWebServ_Service;
|
||||
import com.budwk.app.base.sms.impl.njupt.ucp.serv.client.UcpWebServ_ServiceLocator;
|
||||
|
||||
import java.net.URL;
|
||||
|
||||
public class MessageSender {
|
||||
public static final int[] MESSAGE_SOLUTION = new int[]{1};
|
||||
public static final int CHANNEL_SMS = 1;
|
||||
public static final int CHANNEL_EMAIL = 2;
|
||||
public static final int CHANNEL_IM = 3;
|
||||
private String ws_url;
|
||||
|
||||
public MessageSender(String url) {
|
||||
this.ws_url = url;
|
||||
}
|
||||
|
||||
public MessageSender(String path, String url) {
|
||||
this.ws_url = url;
|
||||
System.setProperty("javax.net.ssl.keyStore", path);
|
||||
System.setProperty("javax.net.ssl.keyStorePassword", "changeit");
|
||||
System.setProperty("javax.net.ssl.keyStoreType", "PKCS12");
|
||||
}
|
||||
|
||||
public UcpWebServ_PortType loadUcpClient() throws Exception {
|
||||
UcpWebServ_Service uws_s = new UcpWebServ_ServiceLocator();
|
||||
return uws_s.getUcpWebServPort(new URL(this.ws_url));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.serv.client;
|
||||
|
||||
import org.apache.axis.description.ElementDesc;
|
||||
import org.apache.axis.description.TypeDesc;
|
||||
import org.apache.axis.encoding.Deserializer;
|
||||
import org.apache.axis.encoding.Serializer;
|
||||
import org.apache.axis.encoding.ser.BeanDeserializer;
|
||||
import org.apache.axis.encoding.ser.BeanSerializer;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
import java.io.Serializable;
|
||||
|
||||
public class Address implements Serializable {
|
||||
private String address;
|
||||
private String type;
|
||||
private Object __equalsCalc = null;
|
||||
private boolean __hashCodeCalc = false;
|
||||
private static TypeDesc typeDesc = new TypeDesc(Address.class, true);
|
||||
|
||||
public Address() {
|
||||
}
|
||||
|
||||
public Address(String address, String type) {
|
||||
this.address = address;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return this.address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return this.type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public synchronized boolean equals(Object obj) {
|
||||
if (!(obj instanceof Address)) {
|
||||
return false;
|
||||
} else {
|
||||
Address other = (Address)obj;
|
||||
if (obj == null) {
|
||||
return false;
|
||||
} else if (this == obj) {
|
||||
return true;
|
||||
} else if (this.__equalsCalc != null) {
|
||||
return this.__equalsCalc == obj;
|
||||
} else {
|
||||
this.__equalsCalc = obj;
|
||||
boolean _equals = (this.address == null && other.getAddress() == null || this.address != null && this.address.equals(other.getAddress())) && (this.type == null && other.getType() == null || this.type != null && this.type.equals(other.getType()));
|
||||
this.__equalsCalc = null;
|
||||
return _equals;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized int hashCode() {
|
||||
if (this.__hashCodeCalc) {
|
||||
return 0;
|
||||
} else {
|
||||
this.__hashCodeCalc = true;
|
||||
int _hashCode = 1;
|
||||
if (this.getAddress() != null) {
|
||||
_hashCode += this.getAddress().hashCode();
|
||||
}
|
||||
|
||||
if (this.getType() != null) {
|
||||
_hashCode += this.getType().hashCode();
|
||||
}
|
||||
|
||||
this.__hashCodeCalc = false;
|
||||
return _hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
public static TypeDesc getTypeDesc() {
|
||||
return typeDesc;
|
||||
}
|
||||
|
||||
public static Serializer getSerializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanSerializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
public static Deserializer getDeserializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanDeserializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
static {
|
||||
typeDesc.setXmlType(new QName("http://serv.ucp.sudytech.com/", "address"));
|
||||
ElementDesc elemField = new ElementDesc();
|
||||
elemField.setFieldName("address");
|
||||
elemField.setXmlName(new QName("", "address"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("type");
|
||||
elemField.setXmlName(new QName("", "type"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.serv.client;
|
||||
|
||||
import org.apache.axis.description.ElementDesc;
|
||||
import org.apache.axis.description.TypeDesc;
|
||||
import org.apache.axis.encoding.Deserializer;
|
||||
import org.apache.axis.encoding.Serializer;
|
||||
import org.apache.axis.encoding.ser.BeanDeserializer;
|
||||
import org.apache.axis.encoding.ser.BeanSerializer;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
import java.io.Serializable;
|
||||
|
||||
public class Attachment implements Serializable {
|
||||
private String content;
|
||||
private String mimeType;
|
||||
private String name;
|
||||
private Object __equalsCalc = null;
|
||||
private boolean __hashCodeCalc = false;
|
||||
private static TypeDesc typeDesc = new TypeDesc(Attachment.class, true);
|
||||
|
||||
public Attachment() {
|
||||
}
|
||||
|
||||
public Attachment(String content, String mimeType, String name) {
|
||||
this.content = content;
|
||||
this.mimeType = mimeType;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return this.content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String getMimeType() {
|
||||
return this.mimeType;
|
||||
}
|
||||
|
||||
public void setMimeType(String mimeType) {
|
||||
this.mimeType = mimeType;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public synchronized boolean equals(Object obj) {
|
||||
if (!(obj instanceof Attachment)) {
|
||||
return false;
|
||||
} else {
|
||||
Attachment other = (Attachment)obj;
|
||||
if (obj == null) {
|
||||
return false;
|
||||
} else if (this == obj) {
|
||||
return true;
|
||||
} else if (this.__equalsCalc != null) {
|
||||
return this.__equalsCalc == obj;
|
||||
} else {
|
||||
this.__equalsCalc = obj;
|
||||
boolean _equals = (this.content == null && other.getContent() == null || this.content != null && this.content.equals(other.getContent())) && (this.mimeType == null && other.getMimeType() == null || this.mimeType != null && this.mimeType.equals(other.getMimeType())) && (this.name == null && other.getName() == null || this.name != null && this.name.equals(other.getName()));
|
||||
this.__equalsCalc = null;
|
||||
return _equals;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized int hashCode() {
|
||||
if (this.__hashCodeCalc) {
|
||||
return 0;
|
||||
} else {
|
||||
this.__hashCodeCalc = true;
|
||||
int _hashCode = 1;
|
||||
if (this.getContent() != null) {
|
||||
_hashCode += this.getContent().hashCode();
|
||||
}
|
||||
|
||||
if (this.getMimeType() != null) {
|
||||
_hashCode += this.getMimeType().hashCode();
|
||||
}
|
||||
|
||||
if (this.getName() != null) {
|
||||
_hashCode += this.getName().hashCode();
|
||||
}
|
||||
|
||||
this.__hashCodeCalc = false;
|
||||
return _hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
public static TypeDesc getTypeDesc() {
|
||||
return typeDesc;
|
||||
}
|
||||
|
||||
public static Serializer getSerializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanSerializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
public static Deserializer getDeserializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanDeserializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
static {
|
||||
typeDesc.setXmlType(new QName("http://serv.ucp.sudytech.com/", "attachment"));
|
||||
ElementDesc elemField = new ElementDesc();
|
||||
elemField.setFieldName("content");
|
||||
elemField.setXmlName(new QName("", "content"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("mimeType");
|
||||
elemField.setXmlName(new QName("", "mimeType"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("name");
|
||||
elemField.setXmlName(new QName("", "name"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,208 @@
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.serv.client;
|
||||
|
||||
import org.apache.axis.description.ElementDesc;
|
||||
import org.apache.axis.description.TypeDesc;
|
||||
import org.apache.axis.encoding.Deserializer;
|
||||
import org.apache.axis.encoding.Serializer;
|
||||
import org.apache.axis.encoding.ser.BeanDeserializer;
|
||||
import org.apache.axis.encoding.ser.BeanSerializer;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
import java.io.Serializable;
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class Channel implements Serializable {
|
||||
private String[] addressTypes;
|
||||
private String config;
|
||||
private String friendlyName;
|
||||
private int id;
|
||||
private String implClass;
|
||||
private String name;
|
||||
private Object __equalsCalc = null;
|
||||
private boolean __hashCodeCalc = false;
|
||||
private static TypeDesc typeDesc = new TypeDesc(Channel.class, true);
|
||||
|
||||
public Channel() {
|
||||
}
|
||||
|
||||
public Channel(String[] addressTypes, String config, String friendlyName, int id, String implClass, String name) {
|
||||
this.addressTypes = addressTypes;
|
||||
this.config = config;
|
||||
this.friendlyName = friendlyName;
|
||||
this.id = id;
|
||||
this.implClass = implClass;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String[] getAddressTypes() {
|
||||
return this.addressTypes;
|
||||
}
|
||||
|
||||
public void setAddressTypes(String[] addressTypes) {
|
||||
this.addressTypes = addressTypes;
|
||||
}
|
||||
|
||||
public String getAddressTypes(int i) {
|
||||
return this.addressTypes[i];
|
||||
}
|
||||
|
||||
public void setAddressTypes(int i, String _value) {
|
||||
this.addressTypes[i] = _value;
|
||||
}
|
||||
|
||||
public String getConfig() {
|
||||
return this.config;
|
||||
}
|
||||
|
||||
public void setConfig(String config) {
|
||||
this.config = config;
|
||||
}
|
||||
|
||||
public String getFriendlyName() {
|
||||
return this.friendlyName;
|
||||
}
|
||||
|
||||
public void setFriendlyName(String friendlyName) {
|
||||
this.friendlyName = friendlyName;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getImplClass() {
|
||||
return this.implClass;
|
||||
}
|
||||
|
||||
public void setImplClass(String implClass) {
|
||||
this.implClass = implClass;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public synchronized boolean equals(Object obj) {
|
||||
if (!(obj instanceof Channel)) {
|
||||
return false;
|
||||
} else {
|
||||
Channel other = (Channel)obj;
|
||||
if (obj == null) {
|
||||
return false;
|
||||
} else if (this == obj) {
|
||||
return true;
|
||||
} else if (this.__equalsCalc != null) {
|
||||
return this.__equalsCalc == obj;
|
||||
} else {
|
||||
this.__equalsCalc = obj;
|
||||
boolean _equals = (this.addressTypes == null && other.getAddressTypes() == null || this.addressTypes != null && Arrays.equals(this.addressTypes, other.getAddressTypes())) && (this.config == null && other.getConfig() == null || this.config != null && this.config.equals(other.getConfig())) && (this.friendlyName == null && other.getFriendlyName() == null || this.friendlyName != null && this.friendlyName.equals(other.getFriendlyName())) && this.id == other.getId() && (this.implClass == null && other.getImplClass() == null || this.implClass != null && this.implClass.equals(other.getImplClass())) && (this.name == null && other.getName() == null || this.name != null && this.name.equals(other.getName()));
|
||||
this.__equalsCalc = null;
|
||||
return _equals;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized int hashCode() {
|
||||
if (this.__hashCodeCalc) {
|
||||
return 0;
|
||||
} else {
|
||||
this.__hashCodeCalc = true;
|
||||
int _hashCode = 1;
|
||||
if (this.getAddressTypes() != null) {
|
||||
for(int i = 0; i < Array.getLength(this.getAddressTypes()); ++i) {
|
||||
Object obj = Array.get(this.getAddressTypes(), i);
|
||||
if (obj != null && !obj.getClass().isArray()) {
|
||||
_hashCode += obj.hashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.getConfig() != null) {
|
||||
_hashCode += this.getConfig().hashCode();
|
||||
}
|
||||
|
||||
if (this.getFriendlyName() != null) {
|
||||
_hashCode += this.getFriendlyName().hashCode();
|
||||
}
|
||||
|
||||
_hashCode += this.getId();
|
||||
if (this.getImplClass() != null) {
|
||||
_hashCode += this.getImplClass().hashCode();
|
||||
}
|
||||
|
||||
if (this.getName() != null) {
|
||||
_hashCode += this.getName().hashCode();
|
||||
}
|
||||
|
||||
this.__hashCodeCalc = false;
|
||||
return _hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
public static TypeDesc getTypeDesc() {
|
||||
return typeDesc;
|
||||
}
|
||||
|
||||
public static Serializer getSerializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanSerializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
public static Deserializer getDeserializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanDeserializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
static {
|
||||
typeDesc.setXmlType(new QName("http://serv.ucp.sudytech.com/", "channel"));
|
||||
ElementDesc elemField = new ElementDesc();
|
||||
elemField.setFieldName("addressTypes");
|
||||
elemField.setXmlName(new QName("", "addressTypes"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(true);
|
||||
elemField.setMaxOccursUnbounded(true);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("config");
|
||||
elemField.setXmlName(new QName("", "config"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("friendlyName");
|
||||
elemField.setXmlName(new QName("", "friendlyName"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("id");
|
||||
elemField.setXmlName(new QName("", "id"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "int"));
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("implClass");
|
||||
elemField.setXmlName(new QName("", "implClass"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("name");
|
||||
elemField.setXmlName(new QName("", "name"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
}
|
||||
}
|
||||
+265
@@ -0,0 +1,265 @@
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.serv.client;
|
||||
|
||||
import org.apache.axis.description.ElementDesc;
|
||||
import org.apache.axis.description.TypeDesc;
|
||||
import org.apache.axis.encoding.Deserializer;
|
||||
import org.apache.axis.encoding.Serializer;
|
||||
import org.apache.axis.encoding.ser.BeanDeserializer;
|
||||
import org.apache.axis.encoding.ser.BeanSerializer;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
import java.io.Serializable;
|
||||
import java.util.Calendar;
|
||||
|
||||
public class ChannelDeliverState implements Serializable {
|
||||
private int billCount;
|
||||
private String chanelDeliverId;
|
||||
private int channelId;
|
||||
private String errorMessage;
|
||||
private int frameNo;
|
||||
private Recipient recipientBy;
|
||||
private String recvMessageId;
|
||||
private Calendar sendTime;
|
||||
private Recipient sendTo;
|
||||
private int state;
|
||||
private Object __equalsCalc = null;
|
||||
private boolean __hashCodeCalc = false;
|
||||
private static TypeDesc typeDesc = new TypeDesc(ChannelDeliverState.class, true);
|
||||
|
||||
public ChannelDeliverState() {
|
||||
}
|
||||
|
||||
public ChannelDeliverState(int billCount, String chanelDeliverId, int channelId, String errorMessage, int frameNo, Recipient recipientBy, String recvMessageId, Calendar sendTime, Recipient sendTo, int state) {
|
||||
this.billCount = billCount;
|
||||
this.chanelDeliverId = chanelDeliverId;
|
||||
this.channelId = channelId;
|
||||
this.errorMessage = errorMessage;
|
||||
this.frameNo = frameNo;
|
||||
this.recipientBy = recipientBy;
|
||||
this.recvMessageId = recvMessageId;
|
||||
this.sendTime = sendTime;
|
||||
this.sendTo = sendTo;
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public int getBillCount() {
|
||||
return this.billCount;
|
||||
}
|
||||
|
||||
public void setBillCount(int billCount) {
|
||||
this.billCount = billCount;
|
||||
}
|
||||
|
||||
public String getChanelDeliverId() {
|
||||
return this.chanelDeliverId;
|
||||
}
|
||||
|
||||
public void setChanelDeliverId(String chanelDeliverId) {
|
||||
this.chanelDeliverId = chanelDeliverId;
|
||||
}
|
||||
|
||||
public int getChannelId() {
|
||||
return this.channelId;
|
||||
}
|
||||
|
||||
public void setChannelId(int channelId) {
|
||||
this.channelId = channelId;
|
||||
}
|
||||
|
||||
public String getErrorMessage() {
|
||||
return this.errorMessage;
|
||||
}
|
||||
|
||||
public void setErrorMessage(String errorMessage) {
|
||||
this.errorMessage = errorMessage;
|
||||
}
|
||||
|
||||
public int getFrameNo() {
|
||||
return this.frameNo;
|
||||
}
|
||||
|
||||
public void setFrameNo(int frameNo) {
|
||||
this.frameNo = frameNo;
|
||||
}
|
||||
|
||||
public Recipient getRecipientBy() {
|
||||
return this.recipientBy;
|
||||
}
|
||||
|
||||
public void setRecipientBy(Recipient recipientBy) {
|
||||
this.recipientBy = recipientBy;
|
||||
}
|
||||
|
||||
public String getRecvMessageId() {
|
||||
return this.recvMessageId;
|
||||
}
|
||||
|
||||
public void setRecvMessageId(String recvMessageId) {
|
||||
this.recvMessageId = recvMessageId;
|
||||
}
|
||||
|
||||
public Calendar getSendTime() {
|
||||
return this.sendTime;
|
||||
}
|
||||
|
||||
public void setSendTime(Calendar sendTime) {
|
||||
this.sendTime = sendTime;
|
||||
}
|
||||
|
||||
public Recipient getSendTo() {
|
||||
return this.sendTo;
|
||||
}
|
||||
|
||||
public void setSendTo(Recipient sendTo) {
|
||||
this.sendTo = sendTo;
|
||||
}
|
||||
|
||||
public int getState() {
|
||||
return this.state;
|
||||
}
|
||||
|
||||
public void setState(int state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public synchronized boolean equals(Object obj) {
|
||||
if (!(obj instanceof ChannelDeliverState)) {
|
||||
return false;
|
||||
} else {
|
||||
ChannelDeliverState other = (ChannelDeliverState)obj;
|
||||
if (obj == null) {
|
||||
return false;
|
||||
} else if (this == obj) {
|
||||
return true;
|
||||
} else if (this.__equalsCalc != null) {
|
||||
return this.__equalsCalc == obj;
|
||||
} else {
|
||||
this.__equalsCalc = obj;
|
||||
boolean _equals = this.billCount == other.getBillCount() && (this.chanelDeliverId == null && other.getChanelDeliverId() == null || this.chanelDeliverId != null && this.chanelDeliverId.equals(other.getChanelDeliverId())) && this.channelId == other.getChannelId() && (this.errorMessage == null && other.getErrorMessage() == null || this.errorMessage != null && this.errorMessage.equals(other.getErrorMessage())) && this.frameNo == other.getFrameNo() && (this.recipientBy == null && other.getRecipientBy() == null || this.recipientBy != null && this.recipientBy.equals(other.getRecipientBy())) && (this.recvMessageId == null && other.getRecvMessageId() == null || this.recvMessageId != null && this.recvMessageId.equals(other.getRecvMessageId())) && (this.sendTime == null && other.getSendTime() == null || this.sendTime != null && this.sendTime.equals(other.getSendTime())) && (this.sendTo == null && other.getSendTo() == null || this.sendTo != null && this.sendTo.equals(other.getSendTo())) && this.state == other.getState();
|
||||
this.__equalsCalc = null;
|
||||
return _equals;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized int hashCode() {
|
||||
if (this.__hashCodeCalc) {
|
||||
return 0;
|
||||
} else {
|
||||
this.__hashCodeCalc = true;
|
||||
int _hashCode = 1;
|
||||
_hashCode += this.getBillCount();
|
||||
if (this.getChanelDeliverId() != null) {
|
||||
_hashCode += this.getChanelDeliverId().hashCode();
|
||||
}
|
||||
|
||||
_hashCode += this.getChannelId();
|
||||
if (this.getErrorMessage() != null) {
|
||||
_hashCode += this.getErrorMessage().hashCode();
|
||||
}
|
||||
|
||||
_hashCode += this.getFrameNo();
|
||||
if (this.getRecipientBy() != null) {
|
||||
_hashCode += this.getRecipientBy().hashCode();
|
||||
}
|
||||
|
||||
if (this.getRecvMessageId() != null) {
|
||||
_hashCode += this.getRecvMessageId().hashCode();
|
||||
}
|
||||
|
||||
if (this.getSendTime() != null) {
|
||||
_hashCode += this.getSendTime().hashCode();
|
||||
}
|
||||
|
||||
if (this.getSendTo() != null) {
|
||||
_hashCode += this.getSendTo().hashCode();
|
||||
}
|
||||
|
||||
_hashCode += this.getState();
|
||||
this.__hashCodeCalc = false;
|
||||
return _hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
public static TypeDesc getTypeDesc() {
|
||||
return typeDesc;
|
||||
}
|
||||
|
||||
public static Serializer getSerializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanSerializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
public static Deserializer getDeserializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanDeserializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
static {
|
||||
typeDesc.setXmlType(new QName("http://serv.ucp.sudytech.com/", "channelDeliverState"));
|
||||
ElementDesc elemField = new ElementDesc();
|
||||
elemField.setFieldName("billCount");
|
||||
elemField.setXmlName(new QName("", "billCount"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "int"));
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("chanelDeliverId");
|
||||
elemField.setXmlName(new QName("", "chanelDeliverId"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("channelId");
|
||||
elemField.setXmlName(new QName("", "channelId"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "int"));
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("errorMessage");
|
||||
elemField.setXmlName(new QName("", "errorMessage"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("frameNo");
|
||||
elemField.setXmlName(new QName("", "frameNo"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "int"));
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("recipientBy");
|
||||
elemField.setXmlName(new QName("", "recipientBy"));
|
||||
elemField.setXmlType(new QName("http://serv.ucp.sudytech.com/", "recipient"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("recvMessageId");
|
||||
elemField.setXmlName(new QName("", "recvMessageId"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("sendTime");
|
||||
elemField.setXmlName(new QName("", "sendTime"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "dateTime"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("sendTo");
|
||||
elemField.setXmlName(new QName("", "sendTo"));
|
||||
elemField.setXmlType(new QName("http://serv.ucp.sudytech.com/", "recipient"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("state");
|
||||
elemField.setXmlName(new QName("", "state"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "int"));
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
}
|
||||
}
|
||||
+323
@@ -0,0 +1,323 @@
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.serv.client;
|
||||
|
||||
import org.apache.axis.description.ElementDesc;
|
||||
import org.apache.axis.description.TypeDesc;
|
||||
import org.apache.axis.encoding.Deserializer;
|
||||
import org.apache.axis.encoding.Serializer;
|
||||
import org.apache.axis.encoding.ser.BeanDeserializer;
|
||||
import org.apache.axis.encoding.ser.BeanSerializer;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
import java.io.Serializable;
|
||||
import java.util.Calendar;
|
||||
|
||||
public class ChannelMessageDetail implements Serializable {
|
||||
private int billCount;
|
||||
private String chanelDeliverId;
|
||||
private int channelId;
|
||||
private String errorMessage;
|
||||
private int frameNo;
|
||||
private ChannelMessageDetailProperties properties;
|
||||
private Recipient recipientBy;
|
||||
private String recvMessageId;
|
||||
private String replyContent;
|
||||
private int replyCount;
|
||||
private Calendar sendTime;
|
||||
private Recipient sendTo;
|
||||
private int state;
|
||||
private Object __equalsCalc = null;
|
||||
private boolean __hashCodeCalc = false;
|
||||
private static TypeDesc typeDesc = new TypeDesc(ChannelMessageDetail.class, true);
|
||||
|
||||
public ChannelMessageDetail() {
|
||||
}
|
||||
|
||||
public ChannelMessageDetail(int billCount, String chanelDeliverId, int channelId, String errorMessage, int frameNo, ChannelMessageDetailProperties properties, Recipient recipientBy, String recvMessageId, String replyContent, int replyCount, Calendar sendTime, Recipient sendTo, int state) {
|
||||
this.billCount = billCount;
|
||||
this.chanelDeliverId = chanelDeliverId;
|
||||
this.channelId = channelId;
|
||||
this.errorMessage = errorMessage;
|
||||
this.frameNo = frameNo;
|
||||
this.properties = properties;
|
||||
this.recipientBy = recipientBy;
|
||||
this.recvMessageId = recvMessageId;
|
||||
this.replyContent = replyContent;
|
||||
this.replyCount = replyCount;
|
||||
this.sendTime = sendTime;
|
||||
this.sendTo = sendTo;
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public int getBillCount() {
|
||||
return this.billCount;
|
||||
}
|
||||
|
||||
public void setBillCount(int billCount) {
|
||||
this.billCount = billCount;
|
||||
}
|
||||
|
||||
public String getChanelDeliverId() {
|
||||
return this.chanelDeliverId;
|
||||
}
|
||||
|
||||
public void setChanelDeliverId(String chanelDeliverId) {
|
||||
this.chanelDeliverId = chanelDeliverId;
|
||||
}
|
||||
|
||||
public int getChannelId() {
|
||||
return this.channelId;
|
||||
}
|
||||
|
||||
public void setChannelId(int channelId) {
|
||||
this.channelId = channelId;
|
||||
}
|
||||
|
||||
public String getErrorMessage() {
|
||||
return this.errorMessage;
|
||||
}
|
||||
|
||||
public void setErrorMessage(String errorMessage) {
|
||||
this.errorMessage = errorMessage;
|
||||
}
|
||||
|
||||
public int getFrameNo() {
|
||||
return this.frameNo;
|
||||
}
|
||||
|
||||
public void setFrameNo(int frameNo) {
|
||||
this.frameNo = frameNo;
|
||||
}
|
||||
|
||||
public ChannelMessageDetailProperties getProperties() {
|
||||
return this.properties;
|
||||
}
|
||||
|
||||
public void setProperties(ChannelMessageDetailProperties properties) {
|
||||
this.properties = properties;
|
||||
}
|
||||
|
||||
public Recipient getRecipientBy() {
|
||||
return this.recipientBy;
|
||||
}
|
||||
|
||||
public void setRecipientBy(Recipient recipientBy) {
|
||||
this.recipientBy = recipientBy;
|
||||
}
|
||||
|
||||
public String getRecvMessageId() {
|
||||
return this.recvMessageId;
|
||||
}
|
||||
|
||||
public void setRecvMessageId(String recvMessageId) {
|
||||
this.recvMessageId = recvMessageId;
|
||||
}
|
||||
|
||||
public String getReplyContent() {
|
||||
return this.replyContent;
|
||||
}
|
||||
|
||||
public void setReplyContent(String replyContent) {
|
||||
this.replyContent = replyContent;
|
||||
}
|
||||
|
||||
public int getReplyCount() {
|
||||
return this.replyCount;
|
||||
}
|
||||
|
||||
public void setReplyCount(int replyCount) {
|
||||
this.replyCount = replyCount;
|
||||
}
|
||||
|
||||
public Calendar getSendTime() {
|
||||
return this.sendTime;
|
||||
}
|
||||
|
||||
public void setSendTime(Calendar sendTime) {
|
||||
this.sendTime = sendTime;
|
||||
}
|
||||
|
||||
public Recipient getSendTo() {
|
||||
return this.sendTo;
|
||||
}
|
||||
|
||||
public void setSendTo(Recipient sendTo) {
|
||||
this.sendTo = sendTo;
|
||||
}
|
||||
|
||||
public int getState() {
|
||||
return this.state;
|
||||
}
|
||||
|
||||
public void setState(int state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public synchronized boolean equals(Object obj) {
|
||||
if (!(obj instanceof ChannelMessageDetail)) {
|
||||
return false;
|
||||
} else {
|
||||
ChannelMessageDetail other = (ChannelMessageDetail)obj;
|
||||
if (obj == null) {
|
||||
return false;
|
||||
} else if (this == obj) {
|
||||
return true;
|
||||
} else if (this.__equalsCalc != null) {
|
||||
return this.__equalsCalc == obj;
|
||||
} else {
|
||||
this.__equalsCalc = obj;
|
||||
boolean _equals = this.billCount == other.getBillCount() && (this.chanelDeliverId == null && other.getChanelDeliverId() == null || this.chanelDeliverId != null && this.chanelDeliverId.equals(other.getChanelDeliverId())) && this.channelId == other.getChannelId() && (this.errorMessage == null && other.getErrorMessage() == null || this.errorMessage != null && this.errorMessage.equals(other.getErrorMessage())) && this.frameNo == other.getFrameNo() && (this.properties == null && other.getProperties() == null || this.properties != null && this.properties.equals(other.getProperties())) && (this.recipientBy == null && other.getRecipientBy() == null || this.recipientBy != null && this.recipientBy.equals(other.getRecipientBy())) && (this.recvMessageId == null && other.getRecvMessageId() == null || this.recvMessageId != null && this.recvMessageId.equals(other.getRecvMessageId())) && (this.replyContent == null && other.getReplyContent() == null || this.replyContent != null && this.replyContent.equals(other.getReplyContent())) && this.replyCount == other.getReplyCount() && (this.sendTime == null && other.getSendTime() == null || this.sendTime != null && this.sendTime.equals(other.getSendTime())) && (this.sendTo == null && other.getSendTo() == null || this.sendTo != null && this.sendTo.equals(other.getSendTo())) && this.state == other.getState();
|
||||
this.__equalsCalc = null;
|
||||
return _equals;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized int hashCode() {
|
||||
if (this.__hashCodeCalc) {
|
||||
return 0;
|
||||
} else {
|
||||
this.__hashCodeCalc = true;
|
||||
int _hashCode = 1;
|
||||
_hashCode += this.getBillCount();
|
||||
if (this.getChanelDeliverId() != null) {
|
||||
_hashCode += this.getChanelDeliverId().hashCode();
|
||||
}
|
||||
|
||||
_hashCode += this.getChannelId();
|
||||
if (this.getErrorMessage() != null) {
|
||||
_hashCode += this.getErrorMessage().hashCode();
|
||||
}
|
||||
|
||||
_hashCode += this.getFrameNo();
|
||||
if (this.getProperties() != null) {
|
||||
_hashCode += this.getProperties().hashCode();
|
||||
}
|
||||
|
||||
if (this.getRecipientBy() != null) {
|
||||
_hashCode += this.getRecipientBy().hashCode();
|
||||
}
|
||||
|
||||
if (this.getRecvMessageId() != null) {
|
||||
_hashCode += this.getRecvMessageId().hashCode();
|
||||
}
|
||||
|
||||
if (this.getReplyContent() != null) {
|
||||
_hashCode += this.getReplyContent().hashCode();
|
||||
}
|
||||
|
||||
_hashCode += this.getReplyCount();
|
||||
if (this.getSendTime() != null) {
|
||||
_hashCode += this.getSendTime().hashCode();
|
||||
}
|
||||
|
||||
if (this.getSendTo() != null) {
|
||||
_hashCode += this.getSendTo().hashCode();
|
||||
}
|
||||
|
||||
_hashCode += this.getState();
|
||||
this.__hashCodeCalc = false;
|
||||
return _hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
public static TypeDesc getTypeDesc() {
|
||||
return typeDesc;
|
||||
}
|
||||
|
||||
public static Serializer getSerializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanSerializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
public static Deserializer getDeserializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanDeserializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
static {
|
||||
typeDesc.setXmlType(new QName("http://serv.ucp.sudytech.com/", "channelMessageDetail"));
|
||||
ElementDesc elemField = new ElementDesc();
|
||||
elemField.setFieldName("billCount");
|
||||
elemField.setXmlName(new QName("", "billCount"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "int"));
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("chanelDeliverId");
|
||||
elemField.setXmlName(new QName("", "chanelDeliverId"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("channelId");
|
||||
elemField.setXmlName(new QName("", "channelId"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "int"));
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("errorMessage");
|
||||
elemField.setXmlName(new QName("", "errorMessage"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("frameNo");
|
||||
elemField.setXmlName(new QName("", "frameNo"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "int"));
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("properties");
|
||||
elemField.setXmlName(new QName("", "properties"));
|
||||
elemField.setXmlType(new QName("http://serv.ucp.sudytech.com/", ">channelMessageDetail>properties"));
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("recipientBy");
|
||||
elemField.setXmlName(new QName("", "recipientBy"));
|
||||
elemField.setXmlType(new QName("http://serv.ucp.sudytech.com/", "recipient"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("recvMessageId");
|
||||
elemField.setXmlName(new QName("", "recvMessageId"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("replyContent");
|
||||
elemField.setXmlName(new QName("", "replyContent"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("replyCount");
|
||||
elemField.setXmlName(new QName("", "replyCount"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "int"));
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("sendTime");
|
||||
elemField.setXmlName(new QName("", "sendTime"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "dateTime"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("sendTo");
|
||||
elemField.setXmlName(new QName("", "sendTo"));
|
||||
elemField.setXmlType(new QName("http://serv.ucp.sudytech.com/", "recipient"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("state");
|
||||
elemField.setXmlName(new QName("", "state"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "int"));
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
}
|
||||
}
|
||||
+107
@@ -0,0 +1,107 @@
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.serv.client;
|
||||
|
||||
import org.apache.axis.description.ElementDesc;
|
||||
import org.apache.axis.description.TypeDesc;
|
||||
import org.apache.axis.encoding.Deserializer;
|
||||
import org.apache.axis.encoding.Serializer;
|
||||
import org.apache.axis.encoding.ser.BeanDeserializer;
|
||||
import org.apache.axis.encoding.ser.BeanSerializer;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
import java.io.Serializable;
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class ChannelMessageDetailProperties implements Serializable {
|
||||
private ChannelMessageDetailPropertiesEntry[] entry;
|
||||
private Object __equalsCalc = null;
|
||||
private boolean __hashCodeCalc = false;
|
||||
private static TypeDesc typeDesc = new TypeDesc(ChannelMessageDetailProperties.class, true);
|
||||
|
||||
public ChannelMessageDetailProperties() {
|
||||
}
|
||||
|
||||
public ChannelMessageDetailProperties(ChannelMessageDetailPropertiesEntry[] entry) {
|
||||
this.entry = entry;
|
||||
}
|
||||
|
||||
public ChannelMessageDetailPropertiesEntry[] getEntry() {
|
||||
return this.entry;
|
||||
}
|
||||
|
||||
public void setEntry(ChannelMessageDetailPropertiesEntry[] entry) {
|
||||
this.entry = entry;
|
||||
}
|
||||
|
||||
public ChannelMessageDetailPropertiesEntry getEntry(int i) {
|
||||
return this.entry[i];
|
||||
}
|
||||
|
||||
public void setEntry(int i, ChannelMessageDetailPropertiesEntry _value) {
|
||||
this.entry[i] = _value;
|
||||
}
|
||||
|
||||
public synchronized boolean equals(Object obj) {
|
||||
if (!(obj instanceof ChannelMessageDetailProperties)) {
|
||||
return false;
|
||||
} else {
|
||||
ChannelMessageDetailProperties other = (ChannelMessageDetailProperties)obj;
|
||||
if (obj == null) {
|
||||
return false;
|
||||
} else if (this == obj) {
|
||||
return true;
|
||||
} else if (this.__equalsCalc != null) {
|
||||
return this.__equalsCalc == obj;
|
||||
} else {
|
||||
this.__equalsCalc = obj;
|
||||
boolean _equals = this.entry == null && other.getEntry() == null || this.entry != null && Arrays.equals(this.entry, other.getEntry());
|
||||
this.__equalsCalc = null;
|
||||
return _equals;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized int hashCode() {
|
||||
if (this.__hashCodeCalc) {
|
||||
return 0;
|
||||
} else {
|
||||
this.__hashCodeCalc = true;
|
||||
int _hashCode = 1;
|
||||
if (this.getEntry() != null) {
|
||||
for(int i = 0; i < Array.getLength(this.getEntry()); ++i) {
|
||||
Object obj = Array.get(this.getEntry(), i);
|
||||
if (obj != null && !obj.getClass().isArray()) {
|
||||
_hashCode += obj.hashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.__hashCodeCalc = false;
|
||||
return _hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
public static TypeDesc getTypeDesc() {
|
||||
return typeDesc;
|
||||
}
|
||||
|
||||
public static Serializer getSerializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanSerializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
public static Deserializer getDeserializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanDeserializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
static {
|
||||
typeDesc.setXmlType(new QName("http://serv.ucp.sudytech.com/", ">channelMessageDetail>properties"));
|
||||
ElementDesc elemField = new ElementDesc();
|
||||
elemField.setFieldName("entry");
|
||||
elemField.setXmlName(new QName("", "entry"));
|
||||
elemField.setXmlType(new QName("http://serv.ucp.sudytech.com/", ">>channelMessageDetail>properties>entry"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
elemField.setMaxOccursUnbounded(true);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
}
|
||||
}
|
||||
+112
@@ -0,0 +1,112 @@
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.serv.client;
|
||||
|
||||
import org.apache.axis.description.ElementDesc;
|
||||
import org.apache.axis.description.TypeDesc;
|
||||
import org.apache.axis.encoding.Deserializer;
|
||||
import org.apache.axis.encoding.Serializer;
|
||||
import org.apache.axis.encoding.ser.BeanDeserializer;
|
||||
import org.apache.axis.encoding.ser.BeanSerializer;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
import java.io.Serializable;
|
||||
|
||||
public class ChannelMessageDetailPropertiesEntry implements Serializable {
|
||||
private String key;
|
||||
private String value;
|
||||
private Object __equalsCalc = null;
|
||||
private boolean __hashCodeCalc = false;
|
||||
private static TypeDesc typeDesc = new TypeDesc(ChannelMessageDetailPropertiesEntry.class, true);
|
||||
|
||||
public ChannelMessageDetailPropertiesEntry() {
|
||||
}
|
||||
|
||||
public ChannelMessageDetailPropertiesEntry(String key, String value) {
|
||||
this.key = key;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getKey() {
|
||||
return this.key;
|
||||
}
|
||||
|
||||
public void setKey(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public synchronized boolean equals(Object obj) {
|
||||
if (!(obj instanceof ChannelMessageDetailPropertiesEntry)) {
|
||||
return false;
|
||||
} else {
|
||||
ChannelMessageDetailPropertiesEntry other = (ChannelMessageDetailPropertiesEntry)obj;
|
||||
if (obj == null) {
|
||||
return false;
|
||||
} else if (this == obj) {
|
||||
return true;
|
||||
} else if (this.__equalsCalc != null) {
|
||||
return this.__equalsCalc == obj;
|
||||
} else {
|
||||
this.__equalsCalc = obj;
|
||||
boolean _equals = (this.key == null && other.getKey() == null || this.key != null && this.key.equals(other.getKey())) && (this.value == null && other.getValue() == null || this.value != null && this.value.equals(other.getValue()));
|
||||
this.__equalsCalc = null;
|
||||
return _equals;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized int hashCode() {
|
||||
if (this.__hashCodeCalc) {
|
||||
return 0;
|
||||
} else {
|
||||
this.__hashCodeCalc = true;
|
||||
int _hashCode = 1;
|
||||
if (this.getKey() != null) {
|
||||
_hashCode += this.getKey().hashCode();
|
||||
}
|
||||
|
||||
if (this.getValue() != null) {
|
||||
_hashCode += this.getValue().hashCode();
|
||||
}
|
||||
|
||||
this.__hashCodeCalc = false;
|
||||
return _hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
public static TypeDesc getTypeDesc() {
|
||||
return typeDesc;
|
||||
}
|
||||
|
||||
public static Serializer getSerializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanSerializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
public static Deserializer getDeserializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanDeserializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
static {
|
||||
typeDesc.setXmlType(new QName("http://serv.ucp.sudytech.com/", ">>channelMessageDetail>properties>entry"));
|
||||
ElementDesc elemField = new ElementDesc();
|
||||
elemField.setFieldName("key");
|
||||
elemField.setXmlName(new QName("", "key"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("value");
|
||||
elemField.setXmlName(new QName("", "value"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,280 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.serv.client;
|
||||
|
||||
import org.apache.axis.description.ElementDesc;
|
||||
import org.apache.axis.description.TypeDesc;
|
||||
import org.apache.axis.encoding.Deserializer;
|
||||
import org.apache.axis.encoding.Serializer;
|
||||
import org.apache.axis.encoding.ser.BeanDeserializer;
|
||||
import org.apache.axis.encoding.ser.BeanSerializer;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
import java.io.Serializable;
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class Message implements Serializable {
|
||||
private Address[] bcc;
|
||||
private Address[] cc;
|
||||
private String content;
|
||||
private int msgType;
|
||||
private boolean needReply;
|
||||
private MessageProperties properties;
|
||||
private String subject;
|
||||
private Address[] to;
|
||||
private Object __equalsCalc = null;
|
||||
private boolean __hashCodeCalc = false;
|
||||
private static TypeDesc typeDesc = new TypeDesc(Message.class, true);
|
||||
|
||||
public Message() {
|
||||
}
|
||||
|
||||
public Message(Address[] bcc, Address[] cc, String content, int msgType, boolean needReply, MessageProperties properties, String subject, Address[] to) {
|
||||
this.bcc = bcc;
|
||||
this.cc = cc;
|
||||
this.content = content;
|
||||
this.msgType = msgType;
|
||||
this.needReply = needReply;
|
||||
this.properties = properties;
|
||||
this.subject = subject;
|
||||
this.to = to;
|
||||
}
|
||||
|
||||
public Address[] getBcc() {
|
||||
return this.bcc;
|
||||
}
|
||||
|
||||
public void setBcc(Address[] bcc) {
|
||||
this.bcc = bcc;
|
||||
}
|
||||
|
||||
public Address getBcc(int i) {
|
||||
return this.bcc[i];
|
||||
}
|
||||
|
||||
public void setBcc(int i, Address _value) {
|
||||
this.bcc[i] = _value;
|
||||
}
|
||||
|
||||
public Address[] getCc() {
|
||||
return this.cc;
|
||||
}
|
||||
|
||||
public void setCc(Address[] cc) {
|
||||
this.cc = cc;
|
||||
}
|
||||
|
||||
public Address getCc(int i) {
|
||||
return this.cc[i];
|
||||
}
|
||||
|
||||
public void setCc(int i, Address _value) {
|
||||
this.cc[i] = _value;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return this.content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public int getMsgType() {
|
||||
return this.msgType;
|
||||
}
|
||||
|
||||
public void setMsgType(int msgType) {
|
||||
this.msgType = msgType;
|
||||
}
|
||||
|
||||
public boolean isNeedReply() {
|
||||
return this.needReply;
|
||||
}
|
||||
|
||||
public void setNeedReply(boolean needReply) {
|
||||
this.needReply = needReply;
|
||||
}
|
||||
|
||||
public MessageProperties getProperties() {
|
||||
return this.properties;
|
||||
}
|
||||
|
||||
public void setProperties(MessageProperties properties) {
|
||||
this.properties = properties;
|
||||
}
|
||||
|
||||
public String getSubject() {
|
||||
return this.subject;
|
||||
}
|
||||
|
||||
public void setSubject(String subject) {
|
||||
this.subject = subject;
|
||||
}
|
||||
|
||||
public Address[] getTo() {
|
||||
return this.to;
|
||||
}
|
||||
|
||||
public void setTo(Address[] to) {
|
||||
this.to = to;
|
||||
}
|
||||
|
||||
public Address getTo(int i) {
|
||||
return this.to[i];
|
||||
}
|
||||
|
||||
public void setTo(int i, Address _value) {
|
||||
this.to[i] = _value;
|
||||
}
|
||||
|
||||
public synchronized boolean equals(Object obj) {
|
||||
if (!(obj instanceof Message)) {
|
||||
return false;
|
||||
} else {
|
||||
Message other = (Message)obj;
|
||||
if (obj == null) {
|
||||
return false;
|
||||
} else if (this == obj) {
|
||||
return true;
|
||||
} else if (this.__equalsCalc != null) {
|
||||
return this.__equalsCalc == obj;
|
||||
} else {
|
||||
this.__equalsCalc = obj;
|
||||
boolean _equals = (this.bcc == null && other.getBcc() == null || this.bcc != null && Arrays.equals(this.bcc, other.getBcc())) && (this.cc == null && other.getCc() == null || this.cc != null && Arrays.equals(this.cc, other.getCc())) && (this.content == null && other.getContent() == null || this.content != null && this.content.equals(other.getContent())) && this.msgType == other.getMsgType() && this.needReply == other.isNeedReply() && (this.properties == null && other.getProperties() == null || this.properties != null && this.properties.equals(other.getProperties())) && (this.subject == null && other.getSubject() == null || this.subject != null && this.subject.equals(other.getSubject())) && (this.to == null && other.getTo() == null || this.to != null && Arrays.equals(this.to, other.getTo()));
|
||||
this.__equalsCalc = null;
|
||||
return _equals;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized int hashCode() {
|
||||
if (this.__hashCodeCalc) {
|
||||
return 0;
|
||||
} else {
|
||||
this.__hashCodeCalc = true;
|
||||
int _hashCode = 1;
|
||||
int i;
|
||||
Object obj;
|
||||
if (this.getBcc() != null) {
|
||||
for(i = 0; i < Array.getLength(this.getBcc()); ++i) {
|
||||
obj = Array.get(this.getBcc(), i);
|
||||
if (obj != null && !obj.getClass().isArray()) {
|
||||
_hashCode += obj.hashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.getCc() != null) {
|
||||
for(i = 0; i < Array.getLength(this.getCc()); ++i) {
|
||||
obj = Array.get(this.getCc(), i);
|
||||
if (obj != null && !obj.getClass().isArray()) {
|
||||
_hashCode += obj.hashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.getContent() != null) {
|
||||
_hashCode += this.getContent().hashCode();
|
||||
}
|
||||
|
||||
_hashCode += this.getMsgType();
|
||||
_hashCode += (this.isNeedReply() ? Boolean.TRUE : Boolean.FALSE).hashCode();
|
||||
if (this.getProperties() != null) {
|
||||
_hashCode += this.getProperties().hashCode();
|
||||
}
|
||||
|
||||
if (this.getSubject() != null) {
|
||||
_hashCode += this.getSubject().hashCode();
|
||||
}
|
||||
|
||||
if (this.getTo() != null) {
|
||||
for(i = 0; i < Array.getLength(this.getTo()); ++i) {
|
||||
obj = Array.get(this.getTo(), i);
|
||||
if (obj != null && !obj.getClass().isArray()) {
|
||||
_hashCode += obj.hashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.__hashCodeCalc = false;
|
||||
return _hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
public static TypeDesc getTypeDesc() {
|
||||
return typeDesc;
|
||||
}
|
||||
|
||||
public static Serializer getSerializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanSerializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
public static Deserializer getDeserializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanDeserializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
static {
|
||||
typeDesc.setXmlType(new QName("http://serv.ucp.sudytech.com/", "message"));
|
||||
ElementDesc elemField = new ElementDesc();
|
||||
elemField.setFieldName("bcc");
|
||||
elemField.setXmlName(new QName("", "bcc"));
|
||||
elemField.setXmlType(new QName("http://serv.ucp.sudytech.com/", "address"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(true);
|
||||
elemField.setMaxOccursUnbounded(true);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("cc");
|
||||
elemField.setXmlName(new QName("", "cc"));
|
||||
elemField.setXmlType(new QName("http://serv.ucp.sudytech.com/", "address"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(true);
|
||||
elemField.setMaxOccursUnbounded(true);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("content");
|
||||
elemField.setXmlName(new QName("", "content"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("msgType");
|
||||
elemField.setXmlName(new QName("", "msgType"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "int"));
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("needReply");
|
||||
elemField.setXmlName(new QName("", "needReply"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "boolean"));
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("properties");
|
||||
elemField.setXmlName(new QName("", "properties"));
|
||||
elemField.setXmlType(new QName("http://serv.ucp.sudytech.com/", ">message>properties"));
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("subject");
|
||||
elemField.setXmlName(new QName("", "subject"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("to");
|
||||
elemField.setXmlName(new QName("", "to"));
|
||||
elemField.setXmlType(new QName("http://serv.ucp.sudytech.com/", "address"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(true);
|
||||
elemField.setMaxOccursUnbounded(true);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
}
|
||||
}
|
||||
+104
@@ -0,0 +1,104 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.serv.client;
|
||||
|
||||
import org.apache.axis.AxisFault;
|
||||
import org.apache.axis.description.ElementDesc;
|
||||
import org.apache.axis.description.TypeDesc;
|
||||
import org.apache.axis.encoding.Deserializer;
|
||||
import org.apache.axis.encoding.SerializationContext;
|
||||
import org.apache.axis.encoding.Serializer;
|
||||
import org.apache.axis.encoding.ser.BeanDeserializer;
|
||||
import org.apache.axis.encoding.ser.BeanSerializer;
|
||||
import org.xml.sax.Attributes;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
import java.io.IOException;
|
||||
import java.io.Serializable;
|
||||
|
||||
public class MessageException extends AxisFault implements Serializable {
|
||||
private String message1;
|
||||
private Object __equalsCalc = null;
|
||||
private boolean __hashCodeCalc = false;
|
||||
private static TypeDesc typeDesc = new TypeDesc(MessageException.class, true);
|
||||
|
||||
public MessageException() {
|
||||
}
|
||||
|
||||
public MessageException(String message1) {
|
||||
this.message1 = message1;
|
||||
}
|
||||
|
||||
public String getMessage1() {
|
||||
return this.message1;
|
||||
}
|
||||
|
||||
public void setMessage1(String message1) {
|
||||
this.message1 = message1;
|
||||
}
|
||||
|
||||
public synchronized boolean equals(Object obj) {
|
||||
if (!(obj instanceof MessageException)) {
|
||||
return false;
|
||||
} else {
|
||||
MessageException other = (MessageException)obj;
|
||||
if (obj == null) {
|
||||
return false;
|
||||
} else if (this == obj) {
|
||||
return true;
|
||||
} else if (this.__equalsCalc != null) {
|
||||
return this.__equalsCalc == obj;
|
||||
} else {
|
||||
this.__equalsCalc = obj;
|
||||
boolean _equals = this.message1 == null && other.getMessage1() == null || this.message1 != null && this.message1.equals(other.getMessage1());
|
||||
this.__equalsCalc = null;
|
||||
return _equals;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized int hashCode() {
|
||||
if (this.__hashCodeCalc) {
|
||||
return 0;
|
||||
} else {
|
||||
this.__hashCodeCalc = true;
|
||||
int _hashCode = 1;
|
||||
if (this.getMessage1() != null) {
|
||||
_hashCode += this.getMessage1().hashCode();
|
||||
}
|
||||
|
||||
this.__hashCodeCalc = false;
|
||||
return _hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
public static TypeDesc getTypeDesc() {
|
||||
return typeDesc;
|
||||
}
|
||||
|
||||
public static Serializer getSerializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanSerializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
public static Deserializer getDeserializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanDeserializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
public void writeDetails(QName qname, SerializationContext context) throws IOException {
|
||||
context.serialize(qname, (Attributes)null, this);
|
||||
}
|
||||
|
||||
static {
|
||||
typeDesc.setXmlType(new QName("http://serv.ucp.sudytech.com/", "MessageException"));
|
||||
ElementDesc elemField = new ElementDesc();
|
||||
elemField.setFieldName("message1");
|
||||
elemField.setXmlName(new QName("", "message"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
}
|
||||
}
|
||||
+112
@@ -0,0 +1,112 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.serv.client;
|
||||
|
||||
import org.apache.axis.description.ElementDesc;
|
||||
import org.apache.axis.description.TypeDesc;
|
||||
import org.apache.axis.encoding.Deserializer;
|
||||
import org.apache.axis.encoding.Serializer;
|
||||
import org.apache.axis.encoding.ser.BeanDeserializer;
|
||||
import org.apache.axis.encoding.ser.BeanSerializer;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
import java.io.Serializable;
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class MessageProperties implements Serializable {
|
||||
private MessagePropertiesEntry[] entry;
|
||||
private Object __equalsCalc = null;
|
||||
private boolean __hashCodeCalc = false;
|
||||
private static TypeDesc typeDesc = new TypeDesc(MessageProperties.class, true);
|
||||
|
||||
public MessageProperties() {
|
||||
}
|
||||
|
||||
public MessageProperties(MessagePropertiesEntry[] entry) {
|
||||
this.entry = entry;
|
||||
}
|
||||
|
||||
public MessagePropertiesEntry[] getEntry() {
|
||||
return this.entry;
|
||||
}
|
||||
|
||||
public void setEntry(MessagePropertiesEntry[] entry) {
|
||||
this.entry = entry;
|
||||
}
|
||||
|
||||
public MessagePropertiesEntry getEntry(int i) {
|
||||
return this.entry[i];
|
||||
}
|
||||
|
||||
public void setEntry(int i, MessagePropertiesEntry _value) {
|
||||
this.entry[i] = _value;
|
||||
}
|
||||
|
||||
public synchronized boolean equals(Object obj) {
|
||||
if (!(obj instanceof MessageProperties)) {
|
||||
return false;
|
||||
} else {
|
||||
MessageProperties other = (MessageProperties)obj;
|
||||
if (obj == null) {
|
||||
return false;
|
||||
} else if (this == obj) {
|
||||
return true;
|
||||
} else if (this.__equalsCalc != null) {
|
||||
return this.__equalsCalc == obj;
|
||||
} else {
|
||||
this.__equalsCalc = obj;
|
||||
boolean _equals = this.entry == null && other.getEntry() == null || this.entry != null && Arrays.equals(this.entry, other.getEntry());
|
||||
this.__equalsCalc = null;
|
||||
return _equals;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized int hashCode() {
|
||||
if (this.__hashCodeCalc) {
|
||||
return 0;
|
||||
} else {
|
||||
this.__hashCodeCalc = true;
|
||||
int _hashCode = 1;
|
||||
if (this.getEntry() != null) {
|
||||
for(int i = 0; i < Array.getLength(this.getEntry()); ++i) {
|
||||
Object obj = Array.get(this.getEntry(), i);
|
||||
if (obj != null && !obj.getClass().isArray()) {
|
||||
_hashCode += obj.hashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.__hashCodeCalc = false;
|
||||
return _hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
public static TypeDesc getTypeDesc() {
|
||||
return typeDesc;
|
||||
}
|
||||
|
||||
public static Serializer getSerializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanSerializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
public static Deserializer getDeserializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanDeserializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
static {
|
||||
typeDesc.setXmlType(new QName("http://serv.ucp.sudytech.com/", ">message>properties"));
|
||||
ElementDesc elemField = new ElementDesc();
|
||||
elemField.setFieldName("entry");
|
||||
elemField.setXmlName(new QName("", "entry"));
|
||||
elemField.setXmlType(new QName("http://serv.ucp.sudytech.com/", ">>message>properties>entry"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
elemField.setMaxOccursUnbounded(true);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
}
|
||||
}
|
||||
+117
@@ -0,0 +1,117 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.serv.client;
|
||||
|
||||
import org.apache.axis.description.ElementDesc;
|
||||
import org.apache.axis.description.TypeDesc;
|
||||
import org.apache.axis.encoding.Deserializer;
|
||||
import org.apache.axis.encoding.Serializer;
|
||||
import org.apache.axis.encoding.ser.BeanDeserializer;
|
||||
import org.apache.axis.encoding.ser.BeanSerializer;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
import java.io.Serializable;
|
||||
|
||||
public class MessagePropertiesEntry implements Serializable {
|
||||
private String key;
|
||||
private String value;
|
||||
private Object __equalsCalc = null;
|
||||
private boolean __hashCodeCalc = false;
|
||||
private static TypeDesc typeDesc = new TypeDesc(MessagePropertiesEntry.class, true);
|
||||
|
||||
public MessagePropertiesEntry() {
|
||||
}
|
||||
|
||||
public MessagePropertiesEntry(String key, String value) {
|
||||
this.key = key;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getKey() {
|
||||
return this.key;
|
||||
}
|
||||
|
||||
public void setKey(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public synchronized boolean equals(Object obj) {
|
||||
if (!(obj instanceof MessagePropertiesEntry)) {
|
||||
return false;
|
||||
} else {
|
||||
MessagePropertiesEntry other = (MessagePropertiesEntry)obj;
|
||||
if (obj == null) {
|
||||
return false;
|
||||
} else if (this == obj) {
|
||||
return true;
|
||||
} else if (this.__equalsCalc != null) {
|
||||
return this.__equalsCalc == obj;
|
||||
} else {
|
||||
this.__equalsCalc = obj;
|
||||
boolean _equals = (this.key == null && other.getKey() == null || this.key != null && this.key.equals(other.getKey())) && (this.value == null && other.getValue() == null || this.value != null && this.value.equals(other.getValue()));
|
||||
this.__equalsCalc = null;
|
||||
return _equals;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized int hashCode() {
|
||||
if (this.__hashCodeCalc) {
|
||||
return 0;
|
||||
} else {
|
||||
this.__hashCodeCalc = true;
|
||||
int _hashCode = 1;
|
||||
if (this.getKey() != null) {
|
||||
_hashCode += this.getKey().hashCode();
|
||||
}
|
||||
|
||||
if (this.getValue() != null) {
|
||||
_hashCode += this.getValue().hashCode();
|
||||
}
|
||||
|
||||
this.__hashCodeCalc = false;
|
||||
return _hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
public static TypeDesc getTypeDesc() {
|
||||
return typeDesc;
|
||||
}
|
||||
|
||||
public static Serializer getSerializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanSerializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
public static Deserializer getDeserializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanDeserializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
static {
|
||||
typeDesc.setXmlType(new QName("http://serv.ucp.sudytech.com/", ">>message>properties>entry"));
|
||||
ElementDesc elemField = new ElementDesc();
|
||||
elemField.setFieldName("key");
|
||||
elemField.setXmlName(new QName("", "key"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("value");
|
||||
elemField.setXmlName(new QName("", "value"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.serv.client;
|
||||
|
||||
import org.apache.axis.description.ElementDesc;
|
||||
import org.apache.axis.description.TypeDesc;
|
||||
import org.apache.axis.encoding.Deserializer;
|
||||
import org.apache.axis.encoding.Serializer;
|
||||
import org.apache.axis.encoding.ser.BeanDeserializer;
|
||||
import org.apache.axis.encoding.ser.BeanSerializer;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
import java.io.Serializable;
|
||||
|
||||
public class Recipient implements Serializable {
|
||||
private Address address;
|
||||
private int type;
|
||||
private Object __equalsCalc = null;
|
||||
private boolean __hashCodeCalc = false;
|
||||
private static TypeDesc typeDesc = new TypeDesc(Recipient.class, true);
|
||||
|
||||
public Recipient() {
|
||||
}
|
||||
|
||||
public Recipient(Address address, int type) {
|
||||
this.address = address;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Address getAddress() {
|
||||
return this.address;
|
||||
}
|
||||
|
||||
public void setAddress(Address address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return this.type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public synchronized boolean equals(Object obj) {
|
||||
if (!(obj instanceof Recipient)) {
|
||||
return false;
|
||||
} else {
|
||||
Recipient other = (Recipient)obj;
|
||||
if (obj == null) {
|
||||
return false;
|
||||
} else if (this == obj) {
|
||||
return true;
|
||||
} else if (this.__equalsCalc != null) {
|
||||
return this.__equalsCalc == obj;
|
||||
} else {
|
||||
this.__equalsCalc = obj;
|
||||
boolean _equals = (this.address == null && other.getAddress() == null || this.address != null && this.address.equals(other.getAddress())) && this.type == other.getType();
|
||||
this.__equalsCalc = null;
|
||||
return _equals;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized int hashCode() {
|
||||
if (this.__hashCodeCalc) {
|
||||
return 0;
|
||||
} else {
|
||||
this.__hashCodeCalc = true;
|
||||
int _hashCode = 1;
|
||||
if (this.getAddress() != null) {
|
||||
_hashCode += this.getAddress().hashCode();
|
||||
}
|
||||
|
||||
_hashCode += this.getType();
|
||||
this.__hashCodeCalc = false;
|
||||
return _hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
public static TypeDesc getTypeDesc() {
|
||||
return typeDesc;
|
||||
}
|
||||
|
||||
public static Serializer getSerializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanSerializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
public static Deserializer getDeserializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanDeserializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
static {
|
||||
typeDesc.setXmlType(new QName("http://serv.ucp.sudytech.com/", "recipient"));
|
||||
ElementDesc elemField = new ElementDesc();
|
||||
elemField.setFieldName("address");
|
||||
elemField.setXmlName(new QName("", "address"));
|
||||
elemField.setXmlType(new QName("http://serv.ucp.sudytech.com/", "address"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("type");
|
||||
elemField.setXmlName(new QName("", "type"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "int"));
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.serv.client;
|
||||
|
||||
import org.apache.axis.description.ElementDesc;
|
||||
import org.apache.axis.description.TypeDesc;
|
||||
import org.apache.axis.encoding.Deserializer;
|
||||
import org.apache.axis.encoding.Serializer;
|
||||
import org.apache.axis.encoding.ser.BeanDeserializer;
|
||||
import org.apache.axis.encoding.ser.BeanSerializer;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
import java.io.Serializable;
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class SendResult implements Serializable {
|
||||
private String errorInfo;
|
||||
private String messageId;
|
||||
private boolean succeeded;
|
||||
private WrongAddress[] wrongAddresses;
|
||||
private Object __equalsCalc = null;
|
||||
private boolean __hashCodeCalc = false;
|
||||
private static TypeDesc typeDesc = new TypeDesc(SendResult.class, true);
|
||||
|
||||
public SendResult() {
|
||||
}
|
||||
|
||||
public SendResult(String errorInfo, String messageId, boolean succeeded, WrongAddress[] wrongAddresses) {
|
||||
this.errorInfo = errorInfo;
|
||||
this.messageId = messageId;
|
||||
this.succeeded = succeeded;
|
||||
this.wrongAddresses = wrongAddresses;
|
||||
}
|
||||
|
||||
public String getErrorInfo() {
|
||||
return this.errorInfo;
|
||||
}
|
||||
|
||||
public void setErrorInfo(String errorInfo) {
|
||||
this.errorInfo = errorInfo;
|
||||
}
|
||||
|
||||
public String getMessageId() {
|
||||
return this.messageId;
|
||||
}
|
||||
|
||||
public void setMessageId(String messageId) {
|
||||
this.messageId = messageId;
|
||||
}
|
||||
|
||||
public boolean isSucceeded() {
|
||||
return this.succeeded;
|
||||
}
|
||||
|
||||
public void setSucceeded(boolean succeeded) {
|
||||
this.succeeded = succeeded;
|
||||
}
|
||||
|
||||
public WrongAddress[] getWrongAddresses() {
|
||||
return this.wrongAddresses;
|
||||
}
|
||||
|
||||
public void setWrongAddresses(WrongAddress[] wrongAddresses) {
|
||||
this.wrongAddresses = wrongAddresses;
|
||||
}
|
||||
|
||||
public WrongAddress getWrongAddresses(int i) {
|
||||
return this.wrongAddresses[i];
|
||||
}
|
||||
|
||||
public void setWrongAddresses(int i, WrongAddress _value) {
|
||||
this.wrongAddresses[i] = _value;
|
||||
}
|
||||
|
||||
public synchronized boolean equals(Object obj) {
|
||||
if (!(obj instanceof SendResult)) {
|
||||
return false;
|
||||
} else {
|
||||
SendResult other = (SendResult)obj;
|
||||
if (obj == null) {
|
||||
return false;
|
||||
} else if (this == obj) {
|
||||
return true;
|
||||
} else if (this.__equalsCalc != null) {
|
||||
return this.__equalsCalc == obj;
|
||||
} else {
|
||||
this.__equalsCalc = obj;
|
||||
boolean _equals = (this.errorInfo == null && other.getErrorInfo() == null || this.errorInfo != null && this.errorInfo.equals(other.getErrorInfo())) && (this.messageId == null && other.getMessageId() == null || this.messageId != null && this.messageId.equals(other.getMessageId())) && this.succeeded == other.isSucceeded() && (this.wrongAddresses == null && other.getWrongAddresses() == null || this.wrongAddresses != null && Arrays.equals(this.wrongAddresses, other.getWrongAddresses()));
|
||||
this.__equalsCalc = null;
|
||||
return _equals;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized int hashCode() {
|
||||
if (this.__hashCodeCalc) {
|
||||
return 0;
|
||||
} else {
|
||||
this.__hashCodeCalc = true;
|
||||
int _hashCode = 1;
|
||||
if (this.getErrorInfo() != null) {
|
||||
_hashCode += this.getErrorInfo().hashCode();
|
||||
}
|
||||
|
||||
if (this.getMessageId() != null) {
|
||||
_hashCode += this.getMessageId().hashCode();
|
||||
}
|
||||
|
||||
_hashCode += (this.isSucceeded() ? Boolean.TRUE : Boolean.FALSE).hashCode();
|
||||
if (this.getWrongAddresses() != null) {
|
||||
for(int i = 0; i < Array.getLength(this.getWrongAddresses()); ++i) {
|
||||
Object obj = Array.get(this.getWrongAddresses(), i);
|
||||
if (obj != null && !obj.getClass().isArray()) {
|
||||
_hashCode += obj.hashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.__hashCodeCalc = false;
|
||||
return _hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
public static TypeDesc getTypeDesc() {
|
||||
return typeDesc;
|
||||
}
|
||||
|
||||
public static Serializer getSerializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanSerializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
public static Deserializer getDeserializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanDeserializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
static {
|
||||
typeDesc.setXmlType(new QName("http://serv.ucp.sudytech.com/", "sendResult"));
|
||||
ElementDesc elemField = new ElementDesc();
|
||||
elemField.setFieldName("errorInfo");
|
||||
elemField.setXmlName(new QName("", "errorInfo"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("messageId");
|
||||
elemField.setXmlName(new QName("", "messageId"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("succeeded");
|
||||
elemField.setXmlName(new QName("", "succeeded"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "boolean"));
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("wrongAddresses");
|
||||
elemField.setXmlName(new QName("", "wrongAddresses"));
|
||||
elemField.setXmlType(new QName("http://serv.ucp.sudytech.com/", "wrongAddress"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(true);
|
||||
elemField.setMaxOccursUnbounded(true);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
}
|
||||
}
|
||||
+940
@@ -0,0 +1,940 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.serv.client;
|
||||
|
||||
import org.apache.axis.AxisFault;
|
||||
import org.apache.axis.NoEndPointException;
|
||||
import org.apache.axis.client.Call;
|
||||
import org.apache.axis.client.Stub;
|
||||
import org.apache.axis.constants.Style;
|
||||
import org.apache.axis.constants.Use;
|
||||
import org.apache.axis.description.FaultDesc;
|
||||
import org.apache.axis.description.OperationDesc;
|
||||
import org.apache.axis.description.ParameterDesc;
|
||||
import org.apache.axis.encoding.DeserializerFactory;
|
||||
import org.apache.axis.encoding.ser.*;
|
||||
import org.apache.axis.soap.SOAPConstants;
|
||||
import org.apache.axis.utils.JavaUtils;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
import javax.xml.rpc.Service;
|
||||
import javax.xml.rpc.encoding.SerializerFactory;
|
||||
import java.net.URL;
|
||||
import java.rmi.RemoteException;
|
||||
import java.util.Calendar;
|
||||
import java.util.Enumeration;
|
||||
import java.util.Vector;
|
||||
|
||||
public class UcpWebServPortBindingStub extends Stub implements UcpWebServ_PortType {
|
||||
private Vector cachedSerClasses;
|
||||
private Vector cachedSerQNames;
|
||||
private Vector cachedSerFactories;
|
||||
private Vector cachedDeserFactories;
|
||||
static OperationDesc[] _operations = new OperationDesc[12];
|
||||
|
||||
private static void _initOperationDesc1() {
|
||||
OperationDesc oper = new OperationDesc();
|
||||
oper.setName("sendMessage");
|
||||
ParameterDesc param = new ParameterDesc(new QName("", "boxId"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "int"), Integer.TYPE, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "message"), (byte)1, new QName("http://serv.ucp.sudytech.com/", "message"), Message.class, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "channels"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "int"), int[].class, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "usesSignature"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "boolean"), Boolean.TYPE, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "plannedTime"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "dateTime"), Calendar.class, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "serviceToken"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
oper.setReturnType(new QName("http://serv.ucp.sudytech.com/", "sendResult"));
|
||||
oper.setReturnClass(SendResult.class);
|
||||
oper.setReturnQName(new QName("", "return"));
|
||||
oper.setStyle(Style.WRAPPED);
|
||||
oper.setUse(Use.LITERAL);
|
||||
oper.addFault(new FaultDesc(new QName("http://serv.ucp.sudytech.com/", "MessageException"), "com.sudytech.ucp.serv.client.MessageException", new QName("http://serv.ucp.sudytech.com/", "MessageException"), true));
|
||||
_operations[0] = oper;
|
||||
oper = new OperationDesc();
|
||||
oper.setName("addAttachment");
|
||||
param = new ParameterDesc(new QName("", "messageId"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "attachment"), (byte)1, new QName("http://serv.ucp.sudytech.com/", "attachment"), Attachment.class, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "serviceToken"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
oper.setReturnType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
oper.setReturnClass(String.class);
|
||||
oper.setReturnQName(new QName("", "return"));
|
||||
oper.setStyle(Style.WRAPPED);
|
||||
oper.setUse(Use.LITERAL);
|
||||
oper.addFault(new FaultDesc(new QName("http://serv.ucp.sudytech.com/", "MessageException"), "com.sudytech.ucp.serv.client.MessageException", new QName("http://serv.ucp.sudytech.com/", "MessageException"), true));
|
||||
_operations[1] = oper;
|
||||
oper = new OperationDesc();
|
||||
oper.setName("deleteAttachment");
|
||||
param = new ParameterDesc(new QName("", "messageId"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "attachmentId"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "serviceToken"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
oper.setReturnType(new QName("http://www.w3.org/2001/XMLSchema", "boolean"));
|
||||
oper.setReturnClass(Boolean.TYPE);
|
||||
oper.setReturnQName(new QName("", "return"));
|
||||
oper.setStyle(Style.WRAPPED);
|
||||
oper.setUse(Use.LITERAL);
|
||||
oper.addFault(new FaultDesc(new QName("http://serv.ucp.sudytech.com/", "MessageException"), "com.sudytech.ucp.serv.client.MessageException", new QName("http://serv.ucp.sudytech.com/", "MessageException"), true));
|
||||
_operations[2] = oper;
|
||||
oper = new OperationDesc();
|
||||
oper.setName("createMessage");
|
||||
param = new ParameterDesc(new QName("", "boxId"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "int"), Integer.TYPE, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "message"), (byte)1, new QName("http://serv.ucp.sudytech.com/", "message"), Message.class, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "serviceToken"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
oper.setReturnType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
oper.setReturnClass(String.class);
|
||||
oper.setReturnQName(new QName("", "return"));
|
||||
oper.setStyle(Style.WRAPPED);
|
||||
oper.setUse(Use.LITERAL);
|
||||
oper.addFault(new FaultDesc(new QName("http://serv.ucp.sudytech.com/", "MessageException"), "com.sudytech.ucp.serv.client.MessageException", new QName("http://serv.ucp.sudytech.com/", "MessageException"), true));
|
||||
_operations[3] = oper;
|
||||
oper = new OperationDesc();
|
||||
oper.setName("deleteMessage");
|
||||
param = new ParameterDesc(new QName("", "messageId"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "serviceToken"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
oper.setReturnType(new QName("http://www.w3.org/2001/XMLSchema", "boolean"));
|
||||
oper.setReturnClass(Boolean.TYPE);
|
||||
oper.setReturnQName(new QName("", "return"));
|
||||
oper.setStyle(Style.WRAPPED);
|
||||
oper.setUse(Use.LITERAL);
|
||||
oper.addFault(new FaultDesc(new QName("http://serv.ucp.sudytech.com/", "MessageException"), "com.sudytech.ucp.serv.client.MessageException", new QName("http://serv.ucp.sudytech.com/", "MessageException"), true));
|
||||
_operations[4] = oper;
|
||||
oper = new OperationDesc();
|
||||
oper.setName("sendSavedMessage");
|
||||
param = new ParameterDesc(new QName("", "messageId"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "channels"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "int"), int[].class, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "usesSignature"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "boolean"), Boolean.TYPE, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "plannedTime"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "dateTime"), Calendar.class, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "serviceToken"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
oper.setReturnType(new QName("http://serv.ucp.sudytech.com/", "sendResult"));
|
||||
oper.setReturnClass(SendResult.class);
|
||||
oper.setReturnQName(new QName("", "return"));
|
||||
oper.setStyle(Style.WRAPPED);
|
||||
oper.setUse(Use.LITERAL);
|
||||
oper.addFault(new FaultDesc(new QName("http://serv.ucp.sudytech.com/", "MessageException"), "com.sudytech.ucp.serv.client.MessageException", new QName("http://serv.ucp.sudytech.com/", "MessageException"), true));
|
||||
_operations[5] = oper;
|
||||
oper = new OperationDesc();
|
||||
oper.setName("sendIndivMessage");
|
||||
param = new ParameterDesc(new QName("", "boxId"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "int"), Integer.TYPE, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "message"), (byte)1, new QName("http://serv.ucp.sudytech.com/", "message"), Message.class, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "channels"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "int"), int[].class, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "usesSignature"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "boolean"), Boolean.TYPE, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "solution"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "int"), Integer.TYPE, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "datasrc"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "idvidualParams"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "plannedTime"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "dateTime"), Calendar.class, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "serviceToken"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
oper.setReturnType(new QName("http://serv.ucp.sudytech.com/", "sendResult"));
|
||||
oper.setReturnClass(SendResult.class);
|
||||
oper.setReturnQName(new QName("", "return"));
|
||||
oper.setStyle(Style.WRAPPED);
|
||||
oper.setUse(Use.LITERAL);
|
||||
oper.addFault(new FaultDesc(new QName("http://serv.ucp.sudytech.com/", "MessageException"), "com.sudytech.ucp.serv.client.MessageException", new QName("http://serv.ucp.sudytech.com/", "MessageException"), true));
|
||||
_operations[6] = oper;
|
||||
oper = new OperationDesc();
|
||||
oper.setName("sendIndivSavedMessage");
|
||||
param = new ParameterDesc(new QName("", "messageId"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "channels"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "int"), int[].class, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "usesSignature"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "boolean"), Boolean.TYPE, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "solution"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "int"), Integer.TYPE, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "datasrc"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "idvidualParams"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "plannedTime"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "dateTime"), Calendar.class, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "serviceToken"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
oper.setReturnType(new QName("http://serv.ucp.sudytech.com/", "sendResult"));
|
||||
oper.setReturnClass(SendResult.class);
|
||||
oper.setReturnQName(new QName("", "return"));
|
||||
oper.setStyle(Style.WRAPPED);
|
||||
oper.setUse(Use.LITERAL);
|
||||
oper.addFault(new FaultDesc(new QName("http://serv.ucp.sudytech.com/", "MessageException"), "com.sudytech.ucp.serv.client.MessageException", new QName("http://serv.ucp.sudytech.com/", "MessageException"), true));
|
||||
_operations[7] = oper;
|
||||
oper = new OperationDesc();
|
||||
oper.setName("getMessageDeliverCount");
|
||||
param = new ParameterDesc(new QName("", "messageId"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "channel"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "int"), Integer.TYPE, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "serviceToken"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
oper.setReturnType(new QName("http://www.w3.org/2001/XMLSchema", "int"));
|
||||
oper.setReturnClass(Integer.TYPE);
|
||||
oper.setReturnQName(new QName("", "return"));
|
||||
oper.setStyle(Style.WRAPPED);
|
||||
oper.setUse(Use.LITERAL);
|
||||
_operations[8] = oper;
|
||||
oper = new OperationDesc();
|
||||
oper.setName("getMessageDelivers");
|
||||
param = new ParameterDesc(new QName("", "messageId"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "channel"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "int"), Integer.TYPE, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "beginIndex"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "int"), Integer.TYPE, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "count"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "int"), Integer.TYPE, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "serviceToken"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
oper.setReturnType(new QName("http://serv.ucp.sudytech.com/", "channelDeliverState"));
|
||||
oper.setReturnClass(ChannelDeliverState[].class);
|
||||
oper.setReturnQName(new QName("", "return"));
|
||||
oper.setStyle(Style.WRAPPED);
|
||||
oper.setUse(Use.LITERAL);
|
||||
_operations[9] = oper;
|
||||
}
|
||||
|
||||
private static void _initOperationDesc2() {
|
||||
OperationDesc oper = new OperationDesc();
|
||||
oper.setName("getChannelMessageDetailCount");
|
||||
ParameterDesc param = new ParameterDesc(new QName("", "messageId"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "channel"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "int"), Integer.TYPE, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "serviceToken"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
oper.setReturnType(new QName("http://www.w3.org/2001/XMLSchema", "int"));
|
||||
oper.setReturnClass(Integer.TYPE);
|
||||
oper.setReturnQName(new QName("", "return"));
|
||||
oper.setStyle(Style.WRAPPED);
|
||||
oper.setUse(Use.LITERAL);
|
||||
_operations[10] = oper;
|
||||
oper = new OperationDesc();
|
||||
oper.setName("getChannelMessageDetails");
|
||||
param = new ParameterDesc(new QName("", "messageId"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "channel"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "int"), Integer.TYPE, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "beginIndex"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "int"), Integer.TYPE, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "count"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "int"), Integer.TYPE, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "serviceToken"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
oper.setReturnType(new QName("http://serv.ucp.sudytech.com/", "channelMessageDetail"));
|
||||
oper.setReturnClass(ChannelMessageDetail[].class);
|
||||
oper.setReturnQName(new QName("", "return"));
|
||||
oper.setStyle(Style.WRAPPED);
|
||||
oper.setUse(Use.LITERAL);
|
||||
_operations[11] = oper;
|
||||
}
|
||||
|
||||
public UcpWebServPortBindingStub() throws AxisFault {
|
||||
this((Service)null);
|
||||
}
|
||||
|
||||
public UcpWebServPortBindingStub(URL endpointURL, Service service) throws AxisFault {
|
||||
this(service);
|
||||
super.cachedEndpoint = endpointURL;
|
||||
}
|
||||
|
||||
public UcpWebServPortBindingStub(Service service) throws AxisFault {
|
||||
this.cachedSerClasses = new Vector();
|
||||
this.cachedSerQNames = new Vector();
|
||||
this.cachedSerFactories = new Vector();
|
||||
this.cachedDeserFactories = new Vector();
|
||||
if (service == null) {
|
||||
super.service = new org.apache.axis.client.Service();
|
||||
} else {
|
||||
super.service = service;
|
||||
}
|
||||
|
||||
((org.apache.axis.client.Service)super.service).setTypeMappingVersion("1.2");
|
||||
Class beansf = BeanSerializerFactory.class;
|
||||
Class beandf = BeanDeserializerFactory.class;
|
||||
Class enumsf = EnumSerializerFactory.class;
|
||||
Class enumdf = EnumDeserializerFactory.class;
|
||||
Class arraysf = ArraySerializerFactory.class;
|
||||
Class arraydf = ArrayDeserializerFactory.class;
|
||||
Class simplesf = SimpleSerializerFactory.class;
|
||||
Class simpledf = SimpleDeserializerFactory.class;
|
||||
Class simplelistsf = SimpleListSerializerFactory.class;
|
||||
Class simplelistdf = SimpleListDeserializerFactory.class;
|
||||
QName qName = new QName("http://serv.ucp.sudytech.com/", ">>channelMessageDetail>properties>entry");
|
||||
this.cachedSerQNames.add(qName);
|
||||
Class cls = ChannelMessageDetailPropertiesEntry.class;
|
||||
this.cachedSerClasses.add(cls);
|
||||
this.cachedSerFactories.add(beansf);
|
||||
this.cachedDeserFactories.add(beandf);
|
||||
qName = new QName("http://serv.ucp.sudytech.com/", ">>message>properties>entry");
|
||||
this.cachedSerQNames.add(qName);
|
||||
cls = MessagePropertiesEntry.class;
|
||||
this.cachedSerClasses.add(cls);
|
||||
this.cachedSerFactories.add(beansf);
|
||||
this.cachedDeserFactories.add(beandf);
|
||||
qName = new QName("http://serv.ucp.sudytech.com/", ">channelMessageDetail>properties");
|
||||
this.cachedSerQNames.add(qName);
|
||||
cls = ChannelMessageDetailProperties.class;
|
||||
this.cachedSerClasses.add(cls);
|
||||
this.cachedSerFactories.add(beansf);
|
||||
this.cachedDeserFactories.add(beandf);
|
||||
qName = new QName("http://serv.ucp.sudytech.com/", ">message>properties");
|
||||
this.cachedSerQNames.add(qName);
|
||||
cls = MessageProperties.class;
|
||||
this.cachedSerClasses.add(cls);
|
||||
this.cachedSerFactories.add(beansf);
|
||||
this.cachedDeserFactories.add(beandf);
|
||||
qName = new QName("http://serv.ucp.sudytech.com/", "address");
|
||||
this.cachedSerQNames.add(qName);
|
||||
cls = Address.class;
|
||||
this.cachedSerClasses.add(cls);
|
||||
this.cachedSerFactories.add(beansf);
|
||||
this.cachedDeserFactories.add(beandf);
|
||||
qName = new QName("http://serv.ucp.sudytech.com/", "attachment");
|
||||
this.cachedSerQNames.add(qName);
|
||||
cls = Attachment.class;
|
||||
this.cachedSerClasses.add(cls);
|
||||
this.cachedSerFactories.add(beansf);
|
||||
this.cachedDeserFactories.add(beandf);
|
||||
qName = new QName("http://serv.ucp.sudytech.com/", "channel");
|
||||
this.cachedSerQNames.add(qName);
|
||||
cls = Channel.class;
|
||||
this.cachedSerClasses.add(cls);
|
||||
this.cachedSerFactories.add(beansf);
|
||||
this.cachedDeserFactories.add(beandf);
|
||||
qName = new QName("http://serv.ucp.sudytech.com/", "channelDeliverState");
|
||||
this.cachedSerQNames.add(qName);
|
||||
cls = ChannelDeliverState.class;
|
||||
this.cachedSerClasses.add(cls);
|
||||
this.cachedSerFactories.add(beansf);
|
||||
this.cachedDeserFactories.add(beandf);
|
||||
qName = new QName("http://serv.ucp.sudytech.com/", "channelMessageDetail");
|
||||
this.cachedSerQNames.add(qName);
|
||||
cls = ChannelMessageDetail.class;
|
||||
this.cachedSerClasses.add(cls);
|
||||
this.cachedSerFactories.add(beansf);
|
||||
this.cachedDeserFactories.add(beandf);
|
||||
qName = new QName("http://serv.ucp.sudytech.com/", "message");
|
||||
this.cachedSerQNames.add(qName);
|
||||
cls = Message.class;
|
||||
this.cachedSerClasses.add(cls);
|
||||
this.cachedSerFactories.add(beansf);
|
||||
this.cachedDeserFactories.add(beandf);
|
||||
qName = new QName("http://serv.ucp.sudytech.com/", "MessageException");
|
||||
this.cachedSerQNames.add(qName);
|
||||
cls = MessageException.class;
|
||||
this.cachedSerClasses.add(cls);
|
||||
this.cachedSerFactories.add(beansf);
|
||||
this.cachedDeserFactories.add(beandf);
|
||||
qName = new QName("http://serv.ucp.sudytech.com/", "recipient");
|
||||
this.cachedSerQNames.add(qName);
|
||||
cls = Recipient.class;
|
||||
this.cachedSerClasses.add(cls);
|
||||
this.cachedSerFactories.add(beansf);
|
||||
this.cachedDeserFactories.add(beandf);
|
||||
qName = new QName("http://serv.ucp.sudytech.com/", "sendResult");
|
||||
this.cachedSerQNames.add(qName);
|
||||
cls = SendResult.class;
|
||||
this.cachedSerClasses.add(cls);
|
||||
this.cachedSerFactories.add(beansf);
|
||||
this.cachedDeserFactories.add(beandf);
|
||||
qName = new QName("http://serv.ucp.sudytech.com/", "wrongAddress");
|
||||
this.cachedSerQNames.add(qName);
|
||||
cls = WrongAddress.class;
|
||||
this.cachedSerClasses.add(cls);
|
||||
this.cachedSerFactories.add(beansf);
|
||||
this.cachedDeserFactories.add(beandf);
|
||||
}
|
||||
|
||||
protected Call createCall() throws RemoteException {
|
||||
try {
|
||||
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);
|
||||
}
|
||||
|
||||
Enumeration keys = super.cachedProperties.keys();
|
||||
|
||||
while(keys.hasMoreElements()) {
|
||||
String key = (String)keys.nextElement();
|
||||
_call.setProperty(key, super.cachedProperties.get(key));
|
||||
}
|
||||
|
||||
synchronized(this) {
|
||||
if (this.firstCall()) {
|
||||
_call.setEncodingStyle((String)null);
|
||||
|
||||
for(int i = 0; i < this.cachedSerFactories.size(); ++i) {
|
||||
Class cls = (Class)this.cachedSerClasses.get(i);
|
||||
QName qName = (QName)this.cachedSerQNames.get(i);
|
||||
Object x = this.cachedSerFactories.get(i);
|
||||
if (x instanceof Class) {
|
||||
Class sf = (Class)this.cachedSerFactories.get(i);
|
||||
Class df = (Class)this.cachedDeserFactories.get(i);
|
||||
_call.registerTypeMapping(cls, qName, sf, df, false);
|
||||
} else if (x instanceof SerializerFactory) {
|
||||
org.apache.axis.encoding.SerializerFactory sf = (org.apache.axis.encoding.SerializerFactory)this.cachedSerFactories.get(i);
|
||||
DeserializerFactory df = (DeserializerFactory)this.cachedDeserFactories.get(i);
|
||||
_call.registerTypeMapping(cls, qName, sf, df, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return _call;
|
||||
} catch (Throwable var12) {
|
||||
throw new AxisFault("Failure trying to get the Call object", var12);
|
||||
}
|
||||
}
|
||||
|
||||
public SendResult sendMessage(int boxId, Message message, int[] channels, boolean usesSignature, Calendar plannedTime, String serviceToken) throws RemoteException, MessageException {
|
||||
if (super.cachedEndpoint == null) {
|
||||
throw new NoEndPointException();
|
||||
} else {
|
||||
Call _call = this.createCall();
|
||||
_call.setOperation(_operations[0]);
|
||||
_call.setUseSOAPAction(true);
|
||||
_call.setSOAPActionURI("");
|
||||
_call.setEncodingStyle((String)null);
|
||||
_call.setProperty("sendXsiTypes", Boolean.FALSE);
|
||||
_call.setProperty("sendMultiRefs", Boolean.FALSE);
|
||||
_call.setSOAPVersion(SOAPConstants.SOAP11_CONSTANTS);
|
||||
_call.setOperationName(new QName("http://serv.ucp.sudytech.com/", "sendMessage"));
|
||||
this.setRequestHeaders(_call);
|
||||
this.setAttachments(_call);
|
||||
|
||||
try {
|
||||
Object _resp = _call.invoke(new Object[]{new Integer(boxId), message, channels, new Boolean(usesSignature), plannedTime, serviceToken});
|
||||
if (_resp instanceof RemoteException) {
|
||||
throw (RemoteException)_resp;
|
||||
} else {
|
||||
this.extractAttachments(_call);
|
||||
|
||||
try {
|
||||
return (SendResult)_resp;
|
||||
} catch (Exception var10) {
|
||||
return (SendResult)JavaUtils.convert(_resp, SendResult.class);
|
||||
}
|
||||
}
|
||||
} catch (AxisFault var11) {
|
||||
if (var11.detail != null) {
|
||||
if (var11.detail instanceof RemoteException) {
|
||||
throw (RemoteException)var11.detail;
|
||||
}
|
||||
|
||||
if (var11.detail instanceof MessageException) {
|
||||
throw (MessageException)var11.detail;
|
||||
}
|
||||
}
|
||||
|
||||
throw var11;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public String addAttachment(String messageId, Attachment attachment, String serviceToken) throws RemoteException, MessageException {
|
||||
if (super.cachedEndpoint == null) {
|
||||
throw new NoEndPointException();
|
||||
} else {
|
||||
Call _call = this.createCall();
|
||||
_call.setOperation(_operations[1]);
|
||||
_call.setUseSOAPAction(true);
|
||||
_call.setSOAPActionURI("");
|
||||
_call.setEncodingStyle((String)null);
|
||||
_call.setProperty("sendXsiTypes", Boolean.FALSE);
|
||||
_call.setProperty("sendMultiRefs", Boolean.FALSE);
|
||||
_call.setSOAPVersion(SOAPConstants.SOAP11_CONSTANTS);
|
||||
_call.setOperationName(new QName("http://serv.ucp.sudytech.com/", "addAttachment"));
|
||||
this.setRequestHeaders(_call);
|
||||
this.setAttachments(_call);
|
||||
|
||||
try {
|
||||
Object _resp = _call.invoke(new Object[]{messageId, attachment, serviceToken});
|
||||
if (_resp instanceof RemoteException) {
|
||||
throw (RemoteException)_resp;
|
||||
} else {
|
||||
this.extractAttachments(_call);
|
||||
|
||||
try {
|
||||
return (String)_resp;
|
||||
} catch (Exception var7) {
|
||||
return (String)JavaUtils.convert(_resp, String.class);
|
||||
}
|
||||
}
|
||||
} catch (AxisFault var8) {
|
||||
if (var8.detail != null) {
|
||||
if (var8.detail instanceof RemoteException) {
|
||||
throw (RemoteException)var8.detail;
|
||||
}
|
||||
|
||||
if (var8.detail instanceof MessageException) {
|
||||
throw (MessageException)var8.detail;
|
||||
}
|
||||
}
|
||||
|
||||
throw var8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean deleteAttachment(String messageId, String attachmentId, String serviceToken) throws RemoteException, MessageException {
|
||||
if (super.cachedEndpoint == null) {
|
||||
throw new NoEndPointException();
|
||||
} else {
|
||||
Call _call = this.createCall();
|
||||
_call.setOperation(_operations[2]);
|
||||
_call.setUseSOAPAction(true);
|
||||
_call.setSOAPActionURI("");
|
||||
_call.setEncodingStyle((String)null);
|
||||
_call.setProperty("sendXsiTypes", Boolean.FALSE);
|
||||
_call.setProperty("sendMultiRefs", Boolean.FALSE);
|
||||
_call.setSOAPVersion(SOAPConstants.SOAP11_CONSTANTS);
|
||||
_call.setOperationName(new QName("http://serv.ucp.sudytech.com/", "deleteAttachment"));
|
||||
this.setRequestHeaders(_call);
|
||||
this.setAttachments(_call);
|
||||
|
||||
try {
|
||||
Object _resp = _call.invoke(new Object[]{messageId, attachmentId, serviceToken});
|
||||
if (_resp instanceof RemoteException) {
|
||||
throw (RemoteException)_resp;
|
||||
} else {
|
||||
this.extractAttachments(_call);
|
||||
|
||||
try {
|
||||
return (Boolean)_resp;
|
||||
} catch (Exception var7) {
|
||||
return (Boolean)JavaUtils.convert(_resp, Boolean.TYPE);
|
||||
}
|
||||
}
|
||||
} catch (AxisFault var8) {
|
||||
if (var8.detail != null) {
|
||||
if (var8.detail instanceof RemoteException) {
|
||||
throw (RemoteException)var8.detail;
|
||||
}
|
||||
|
||||
if (var8.detail instanceof MessageException) {
|
||||
throw (MessageException)var8.detail;
|
||||
}
|
||||
}
|
||||
|
||||
throw var8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public String createMessage(int boxId, Message message, String serviceToken) throws RemoteException, MessageException {
|
||||
if (super.cachedEndpoint == null) {
|
||||
throw new NoEndPointException();
|
||||
} else {
|
||||
Call _call = this.createCall();
|
||||
_call.setOperation(_operations[3]);
|
||||
_call.setUseSOAPAction(true);
|
||||
_call.setSOAPActionURI("");
|
||||
_call.setEncodingStyle((String)null);
|
||||
_call.setProperty("sendXsiTypes", Boolean.FALSE);
|
||||
_call.setProperty("sendMultiRefs", Boolean.FALSE);
|
||||
_call.setSOAPVersion(SOAPConstants.SOAP11_CONSTANTS);
|
||||
_call.setOperationName(new QName("http://serv.ucp.sudytech.com/", "createMessage"));
|
||||
this.setRequestHeaders(_call);
|
||||
this.setAttachments(_call);
|
||||
|
||||
try {
|
||||
Object _resp = _call.invoke(new Object[]{new Integer(boxId), message, serviceToken});
|
||||
if (_resp instanceof RemoteException) {
|
||||
throw (RemoteException)_resp;
|
||||
} else {
|
||||
this.extractAttachments(_call);
|
||||
|
||||
try {
|
||||
return (String)_resp;
|
||||
} catch (Exception var7) {
|
||||
return (String)JavaUtils.convert(_resp, String.class);
|
||||
}
|
||||
}
|
||||
} catch (AxisFault var8) {
|
||||
if (var8.detail != null) {
|
||||
if (var8.detail instanceof RemoteException) {
|
||||
throw (RemoteException)var8.detail;
|
||||
}
|
||||
|
||||
if (var8.detail instanceof MessageException) {
|
||||
throw (MessageException)var8.detail;
|
||||
}
|
||||
}
|
||||
|
||||
throw var8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean deleteMessage(String messageId, String serviceToken) throws RemoteException, MessageException {
|
||||
if (super.cachedEndpoint == null) {
|
||||
throw new NoEndPointException();
|
||||
} else {
|
||||
Call _call = this.createCall();
|
||||
_call.setOperation(_operations[4]);
|
||||
_call.setUseSOAPAction(true);
|
||||
_call.setSOAPActionURI("");
|
||||
_call.setEncodingStyle((String)null);
|
||||
_call.setProperty("sendXsiTypes", Boolean.FALSE);
|
||||
_call.setProperty("sendMultiRefs", Boolean.FALSE);
|
||||
_call.setSOAPVersion(SOAPConstants.SOAP11_CONSTANTS);
|
||||
_call.setOperationName(new QName("http://serv.ucp.sudytech.com/", "deleteMessage"));
|
||||
this.setRequestHeaders(_call);
|
||||
this.setAttachments(_call);
|
||||
|
||||
try {
|
||||
Object _resp = _call.invoke(new Object[]{messageId, serviceToken});
|
||||
if (_resp instanceof RemoteException) {
|
||||
throw (RemoteException)_resp;
|
||||
} else {
|
||||
this.extractAttachments(_call);
|
||||
|
||||
try {
|
||||
return (Boolean)_resp;
|
||||
} catch (Exception var6) {
|
||||
return (Boolean)JavaUtils.convert(_resp, Boolean.TYPE);
|
||||
}
|
||||
}
|
||||
} catch (AxisFault var7) {
|
||||
if (var7.detail != null) {
|
||||
if (var7.detail instanceof RemoteException) {
|
||||
throw (RemoteException)var7.detail;
|
||||
}
|
||||
|
||||
if (var7.detail instanceof MessageException) {
|
||||
throw (MessageException)var7.detail;
|
||||
}
|
||||
}
|
||||
|
||||
throw var7;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public SendResult sendSavedMessage(String messageId, int[] channels, boolean usesSignature, Calendar plannedTime, String serviceToken) throws RemoteException, MessageException {
|
||||
if (super.cachedEndpoint == null) {
|
||||
throw new NoEndPointException();
|
||||
} else {
|
||||
Call _call = this.createCall();
|
||||
_call.setOperation(_operations[5]);
|
||||
_call.setUseSOAPAction(true);
|
||||
_call.setSOAPActionURI("");
|
||||
_call.setEncodingStyle((String)null);
|
||||
_call.setProperty("sendXsiTypes", Boolean.FALSE);
|
||||
_call.setProperty("sendMultiRefs", Boolean.FALSE);
|
||||
_call.setSOAPVersion(SOAPConstants.SOAP11_CONSTANTS);
|
||||
_call.setOperationName(new QName("http://serv.ucp.sudytech.com/", "sendSavedMessage"));
|
||||
this.setRequestHeaders(_call);
|
||||
this.setAttachments(_call);
|
||||
|
||||
try {
|
||||
Object _resp = _call.invoke(new Object[]{messageId, channels, new Boolean(usesSignature), plannedTime, serviceToken});
|
||||
if (_resp instanceof RemoteException) {
|
||||
throw (RemoteException)_resp;
|
||||
} else {
|
||||
this.extractAttachments(_call);
|
||||
|
||||
try {
|
||||
return (SendResult)_resp;
|
||||
} catch (Exception var9) {
|
||||
return (SendResult)JavaUtils.convert(_resp, SendResult.class);
|
||||
}
|
||||
}
|
||||
} catch (AxisFault var10) {
|
||||
if (var10.detail != null) {
|
||||
if (var10.detail instanceof RemoteException) {
|
||||
throw (RemoteException)var10.detail;
|
||||
}
|
||||
|
||||
if (var10.detail instanceof MessageException) {
|
||||
throw (MessageException)var10.detail;
|
||||
}
|
||||
}
|
||||
|
||||
throw var10;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public SendResult sendIndivMessage(int boxId, Message message, int[] channels, boolean usesSignature, int solution, String datasrc, String idvidualParams, Calendar plannedTime, String serviceToken) throws RemoteException, MessageException {
|
||||
if (super.cachedEndpoint == null) {
|
||||
throw new NoEndPointException();
|
||||
} else {
|
||||
Call _call = this.createCall();
|
||||
_call.setOperation(_operations[6]);
|
||||
_call.setUseSOAPAction(true);
|
||||
_call.setSOAPActionURI("");
|
||||
_call.setEncodingStyle((String)null);
|
||||
_call.setProperty("sendXsiTypes", Boolean.FALSE);
|
||||
_call.setProperty("sendMultiRefs", Boolean.FALSE);
|
||||
_call.setSOAPVersion(SOAPConstants.SOAP11_CONSTANTS);
|
||||
_call.setOperationName(new QName("http://serv.ucp.sudytech.com/", "sendIndivMessage"));
|
||||
this.setRequestHeaders(_call);
|
||||
this.setAttachments(_call);
|
||||
|
||||
try {
|
||||
Object _resp = _call.invoke(new Object[]{new Integer(boxId), message, channels, new Boolean(usesSignature), new Integer(solution), datasrc, idvidualParams, plannedTime, serviceToken});
|
||||
if (_resp instanceof RemoteException) {
|
||||
throw (RemoteException)_resp;
|
||||
} else {
|
||||
this.extractAttachments(_call);
|
||||
|
||||
try {
|
||||
return (SendResult)_resp;
|
||||
} catch (Exception var13) {
|
||||
return (SendResult)JavaUtils.convert(_resp, SendResult.class);
|
||||
}
|
||||
}
|
||||
} catch (AxisFault var14) {
|
||||
if (var14.detail != null) {
|
||||
if (var14.detail instanceof RemoteException) {
|
||||
throw (RemoteException)var14.detail;
|
||||
}
|
||||
|
||||
if (var14.detail instanceof MessageException) {
|
||||
throw (MessageException)var14.detail;
|
||||
}
|
||||
}
|
||||
|
||||
throw var14;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public SendResult sendIndivSavedMessage(String messageId, int[] channels, boolean usesSignature, int solution, String datasrc, String idvidualParams, Calendar plannedTime, String serviceToken) throws RemoteException, MessageException {
|
||||
if (super.cachedEndpoint == null) {
|
||||
throw new NoEndPointException();
|
||||
} else {
|
||||
Call _call = this.createCall();
|
||||
_call.setOperation(_operations[7]);
|
||||
_call.setUseSOAPAction(true);
|
||||
_call.setSOAPActionURI("");
|
||||
_call.setEncodingStyle((String)null);
|
||||
_call.setProperty("sendXsiTypes", Boolean.FALSE);
|
||||
_call.setProperty("sendMultiRefs", Boolean.FALSE);
|
||||
_call.setSOAPVersion(SOAPConstants.SOAP11_CONSTANTS);
|
||||
_call.setOperationName(new QName("http://serv.ucp.sudytech.com/", "sendIndivSavedMessage"));
|
||||
this.setRequestHeaders(_call);
|
||||
this.setAttachments(_call);
|
||||
|
||||
try {
|
||||
Object _resp = _call.invoke(new Object[]{messageId, channels, new Boolean(usesSignature), new Integer(solution), datasrc, idvidualParams, plannedTime, serviceToken});
|
||||
if (_resp instanceof RemoteException) {
|
||||
throw (RemoteException)_resp;
|
||||
} else {
|
||||
this.extractAttachments(_call);
|
||||
|
||||
try {
|
||||
return (SendResult)_resp;
|
||||
} catch (Exception var12) {
|
||||
return (SendResult)JavaUtils.convert(_resp, SendResult.class);
|
||||
}
|
||||
}
|
||||
} catch (AxisFault var13) {
|
||||
if (var13.detail != null) {
|
||||
if (var13.detail instanceof RemoteException) {
|
||||
throw (RemoteException)var13.detail;
|
||||
}
|
||||
|
||||
if (var13.detail instanceof MessageException) {
|
||||
throw (MessageException)var13.detail;
|
||||
}
|
||||
}
|
||||
|
||||
throw var13;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int getMessageDeliverCount(String messageId, int channel, String serviceToken) throws RemoteException {
|
||||
if (super.cachedEndpoint == null) {
|
||||
throw new NoEndPointException();
|
||||
} else {
|
||||
Call _call = this.createCall();
|
||||
_call.setOperation(_operations[8]);
|
||||
_call.setUseSOAPAction(true);
|
||||
_call.setSOAPActionURI("");
|
||||
_call.setEncodingStyle((String)null);
|
||||
_call.setProperty("sendXsiTypes", Boolean.FALSE);
|
||||
_call.setProperty("sendMultiRefs", Boolean.FALSE);
|
||||
_call.setSOAPVersion(SOAPConstants.SOAP11_CONSTANTS);
|
||||
_call.setOperationName(new QName("http://serv.ucp.sudytech.com/", "getMessageDeliverCount"));
|
||||
this.setRequestHeaders(_call);
|
||||
this.setAttachments(_call);
|
||||
|
||||
try {
|
||||
Object _resp = _call.invoke(new Object[]{messageId, new Integer(channel), serviceToken});
|
||||
if (_resp instanceof RemoteException) {
|
||||
throw (RemoteException)_resp;
|
||||
} else {
|
||||
this.extractAttachments(_call);
|
||||
|
||||
try {
|
||||
return (Integer)_resp;
|
||||
} catch (Exception var7) {
|
||||
return (Integer)JavaUtils.convert(_resp, Integer.TYPE);
|
||||
}
|
||||
}
|
||||
} catch (AxisFault var8) {
|
||||
throw var8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public ChannelDeliverState[] getMessageDelivers(String messageId, int channel, int beginIndex, int count, String serviceToken) throws RemoteException {
|
||||
if (super.cachedEndpoint == null) {
|
||||
throw new NoEndPointException();
|
||||
} else {
|
||||
Call _call = this.createCall();
|
||||
_call.setOperation(_operations[9]);
|
||||
_call.setUseSOAPAction(true);
|
||||
_call.setSOAPActionURI("");
|
||||
_call.setEncodingStyle((String)null);
|
||||
_call.setProperty("sendXsiTypes", Boolean.FALSE);
|
||||
_call.setProperty("sendMultiRefs", Boolean.FALSE);
|
||||
_call.setSOAPVersion(SOAPConstants.SOAP11_CONSTANTS);
|
||||
_call.setOperationName(new QName("http://serv.ucp.sudytech.com/", "getMessageDelivers"));
|
||||
this.setRequestHeaders(_call);
|
||||
this.setAttachments(_call);
|
||||
|
||||
try {
|
||||
Object _resp = _call.invoke(new Object[]{messageId, new Integer(channel), new Integer(beginIndex), new Integer(count), serviceToken});
|
||||
if (_resp instanceof RemoteException) {
|
||||
throw (RemoteException)_resp;
|
||||
} else {
|
||||
this.extractAttachments(_call);
|
||||
|
||||
try {
|
||||
return (ChannelDeliverState[])((ChannelDeliverState[])_resp);
|
||||
} catch (Exception var9) {
|
||||
return (ChannelDeliverState[])((ChannelDeliverState[])JavaUtils.convert(_resp, ChannelDeliverState[].class));
|
||||
}
|
||||
}
|
||||
} catch (AxisFault var10) {
|
||||
throw var10;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int getChannelMessageDetailCount(String messageId, int channel, String serviceToken) throws RemoteException {
|
||||
if (super.cachedEndpoint == null) {
|
||||
throw new NoEndPointException();
|
||||
} else {
|
||||
Call _call = this.createCall();
|
||||
_call.setOperation(_operations[10]);
|
||||
_call.setUseSOAPAction(true);
|
||||
_call.setSOAPActionURI("");
|
||||
_call.setEncodingStyle((String)null);
|
||||
_call.setProperty("sendXsiTypes", Boolean.FALSE);
|
||||
_call.setProperty("sendMultiRefs", Boolean.FALSE);
|
||||
_call.setSOAPVersion(SOAPConstants.SOAP11_CONSTANTS);
|
||||
_call.setOperationName(new QName("http://serv.ucp.sudytech.com/", "getChannelMessageDetailCount"));
|
||||
this.setRequestHeaders(_call);
|
||||
this.setAttachments(_call);
|
||||
|
||||
try {
|
||||
Object _resp = _call.invoke(new Object[]{messageId, new Integer(channel), serviceToken});
|
||||
if (_resp instanceof RemoteException) {
|
||||
throw (RemoteException)_resp;
|
||||
} else {
|
||||
this.extractAttachments(_call);
|
||||
|
||||
try {
|
||||
return (Integer)_resp;
|
||||
} catch (Exception var7) {
|
||||
return (Integer)JavaUtils.convert(_resp, Integer.TYPE);
|
||||
}
|
||||
}
|
||||
} catch (AxisFault var8) {
|
||||
throw var8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public ChannelMessageDetail[] getChannelMessageDetails(String messageId, int channel, int beginIndex, int count, String serviceToken) throws RemoteException {
|
||||
if (super.cachedEndpoint == null) {
|
||||
throw new NoEndPointException();
|
||||
} else {
|
||||
Call _call = this.createCall();
|
||||
_call.setOperation(_operations[11]);
|
||||
_call.setUseSOAPAction(true);
|
||||
_call.setSOAPActionURI("");
|
||||
_call.setEncodingStyle((String)null);
|
||||
_call.setProperty("sendXsiTypes", Boolean.FALSE);
|
||||
_call.setProperty("sendMultiRefs", Boolean.FALSE);
|
||||
_call.setSOAPVersion(SOAPConstants.SOAP11_CONSTANTS);
|
||||
_call.setOperationName(new QName("http://serv.ucp.sudytech.com/", "getChannelMessageDetails"));
|
||||
this.setRequestHeaders(_call);
|
||||
this.setAttachments(_call);
|
||||
|
||||
try {
|
||||
Object _resp = _call.invoke(new Object[]{messageId, new Integer(channel), new Integer(beginIndex), new Integer(count), serviceToken});
|
||||
if (_resp instanceof RemoteException) {
|
||||
throw (RemoteException)_resp;
|
||||
} else {
|
||||
this.extractAttachments(_call);
|
||||
|
||||
try {
|
||||
return (ChannelMessageDetail[])((ChannelMessageDetail[])_resp);
|
||||
} catch (Exception var9) {
|
||||
return (ChannelMessageDetail[])((ChannelMessageDetail[])JavaUtils.convert(_resp, ChannelMessageDetail[].class));
|
||||
}
|
||||
}
|
||||
} catch (AxisFault var10) {
|
||||
throw var10;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static {
|
||||
_initOperationDesc1();
|
||||
_initOperationDesc2();
|
||||
}
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.serv.client;
|
||||
|
||||
import java.rmi.Remote;
|
||||
import java.rmi.RemoteException;
|
||||
import java.util.Calendar;
|
||||
|
||||
public interface UcpWebServ_PortType extends Remote {
|
||||
SendResult sendMessage(int var1, Message var2, int[] var3, boolean var4, Calendar var5, String var6) throws RemoteException, MessageException;
|
||||
|
||||
String addAttachment(String var1, Attachment var2, String var3) throws RemoteException, MessageException;
|
||||
|
||||
boolean deleteAttachment(String var1, String var2, String var3) throws RemoteException, MessageException;
|
||||
|
||||
String createMessage(int var1, Message var2, String var3) throws RemoteException, MessageException;
|
||||
|
||||
boolean deleteMessage(String var1, String var2) throws RemoteException, MessageException;
|
||||
|
||||
SendResult sendSavedMessage(String var1, int[] var2, boolean var3, Calendar var4, String var5) throws RemoteException, MessageException;
|
||||
|
||||
SendResult sendIndivMessage(int var1, Message var2, int[] var3, boolean var4, int var5, String var6, String var7, Calendar var8, String var9) throws RemoteException, MessageException;
|
||||
|
||||
SendResult sendIndivSavedMessage(String var1, int[] var2, boolean var3, int var4, String var5, String var6, Calendar var7, String var8) throws RemoteException, MessageException;
|
||||
|
||||
int getMessageDeliverCount(String var1, int var2, String var3) throws RemoteException;
|
||||
|
||||
ChannelDeliverState[] getMessageDelivers(String var1, int var2, int var3, int var4, String var5) throws RemoteException;
|
||||
|
||||
int getChannelMessageDetailCount(String var1, int var2, String var3) throws RemoteException;
|
||||
|
||||
ChannelMessageDetail[] getChannelMessageDetails(String var1, int var2, int var3, int var4, String var5) throws RemoteException;
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.serv.client;
|
||||
|
||||
import javax.xml.rpc.Service;
|
||||
import javax.xml.rpc.ServiceException;
|
||||
import java.net.URL;
|
||||
|
||||
public interface UcpWebServ_Service extends Service {
|
||||
String getUcpWebServPortAddress();
|
||||
|
||||
UcpWebServ_PortType getUcpWebServPort() throws ServiceException;
|
||||
|
||||
UcpWebServ_PortType getUcpWebServPort(URL var1) throws ServiceException;
|
||||
}
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.serv.client;
|
||||
|
||||
import org.apache.axis.AxisFault;
|
||||
import org.apache.axis.EngineConfiguration;
|
||||
import org.apache.axis.client.Service;
|
||||
import org.apache.axis.client.Stub;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
import javax.xml.rpc.ServiceException;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.rmi.Remote;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
|
||||
public class UcpWebServ_ServiceLocator extends Service implements UcpWebServ_Service {
|
||||
private String UcpWebServPort_address = "http://172.18.10.32:8181/UcpWebServ";
|
||||
private String UcpWebServPortWSDDServiceName = "UcpWebServPort";
|
||||
private HashSet ports = null;
|
||||
|
||||
public UcpWebServ_ServiceLocator() {
|
||||
}
|
||||
|
||||
public UcpWebServ_ServiceLocator(EngineConfiguration config) {
|
||||
super(config);
|
||||
}
|
||||
|
||||
public UcpWebServ_ServiceLocator(String wsdlLoc, QName sName) throws ServiceException {
|
||||
super(wsdlLoc, sName);
|
||||
}
|
||||
|
||||
public String getUcpWebServPortAddress() {
|
||||
return this.UcpWebServPort_address;
|
||||
}
|
||||
|
||||
public String getUcpWebServPortWSDDServiceName() {
|
||||
return this.UcpWebServPortWSDDServiceName;
|
||||
}
|
||||
|
||||
public void setUcpWebServPortWSDDServiceName(String name) {
|
||||
this.UcpWebServPortWSDDServiceName = name;
|
||||
}
|
||||
|
||||
public UcpWebServ_PortType getUcpWebServPort() throws ServiceException {
|
||||
URL endpoint;
|
||||
try {
|
||||
endpoint = new URL(this.UcpWebServPort_address);
|
||||
} catch (MalformedURLException var3) {
|
||||
throw new ServiceException(var3);
|
||||
}
|
||||
|
||||
return this.getUcpWebServPort(endpoint);
|
||||
}
|
||||
|
||||
public UcpWebServ_PortType getUcpWebServPort(URL portAddress) throws ServiceException {
|
||||
try {
|
||||
UcpWebServPortBindingStub _stub = new UcpWebServPortBindingStub(portAddress, this);
|
||||
_stub.setPortName(this.getUcpWebServPortWSDDServiceName());
|
||||
return _stub;
|
||||
} catch (AxisFault var3) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public void setUcpWebServPortEndpointAddress(String address) {
|
||||
this.UcpWebServPort_address = address;
|
||||
}
|
||||
|
||||
public Remote getPort(Class serviceEndpointInterface) throws ServiceException {
|
||||
try {
|
||||
if (UcpWebServ_PortType.class.isAssignableFrom(serviceEndpointInterface)) {
|
||||
UcpWebServPortBindingStub _stub = new UcpWebServPortBindingStub(new URL(this.UcpWebServPort_address), this);
|
||||
_stub.setPortName(this.getUcpWebServPortWSDDServiceName());
|
||||
return _stub;
|
||||
}
|
||||
} catch (Throwable var3) {
|
||||
throw new ServiceException(var3);
|
||||
}
|
||||
|
||||
throw new ServiceException("There is no stub implementation for the interface: " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
|
||||
}
|
||||
|
||||
public Remote getPort(QName portName, Class serviceEndpointInterface) throws ServiceException {
|
||||
if (portName == null) {
|
||||
return this.getPort(serviceEndpointInterface);
|
||||
} else {
|
||||
String inputPortName = portName.getLocalPart();
|
||||
if ("UcpWebServPort".equals(inputPortName)) {
|
||||
return this.getUcpWebServPort();
|
||||
} else {
|
||||
Remote _stub = this.getPort(serviceEndpointInterface);
|
||||
((Stub)_stub).setPortName(portName);
|
||||
return _stub;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public QName getServiceName() {
|
||||
return new QName("http://serv.ucp.sudytech.com/", "UcpWebServ");
|
||||
}
|
||||
|
||||
public Iterator getPorts() {
|
||||
if (this.ports == null) {
|
||||
this.ports = new HashSet();
|
||||
this.ports.add(new QName("http://serv.ucp.sudytech.com/", "UcpWebServPort"));
|
||||
}
|
||||
|
||||
return this.ports.iterator();
|
||||
}
|
||||
|
||||
public void setEndpointAddress(String portName, String address) throws ServiceException {
|
||||
if ("UcpWebServPort".equals(portName)) {
|
||||
this.setUcpWebServPortEndpointAddress(address);
|
||||
} else {
|
||||
throw new ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
|
||||
}
|
||||
}
|
||||
|
||||
public void setEndpointAddress(QName portName, String address) throws ServiceException {
|
||||
this.setEndpointAddress(portName.getLocalPart(), address);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,208 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.serv.client;
|
||||
|
||||
import org.apache.axis.description.ElementDesc;
|
||||
import org.apache.axis.description.TypeDesc;
|
||||
import org.apache.axis.encoding.Deserializer;
|
||||
import org.apache.axis.encoding.Serializer;
|
||||
import org.apache.axis.encoding.ser.BeanDeserializer;
|
||||
import org.apache.axis.encoding.ser.BeanSerializer;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
import java.io.Serializable;
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class WrongAddress implements Serializable {
|
||||
private Address address;
|
||||
private String errorInfo;
|
||||
private int errorType;
|
||||
private Channel[] forbiddenChannels;
|
||||
private Address[] subAddresses;
|
||||
private Object __equalsCalc = null;
|
||||
private boolean __hashCodeCalc = false;
|
||||
private static TypeDesc typeDesc = new TypeDesc(WrongAddress.class, true);
|
||||
|
||||
public WrongAddress() {
|
||||
}
|
||||
|
||||
public WrongAddress(Address address, String errorInfo, int errorType, Channel[] forbiddenChannels, Address[] subAddresses) {
|
||||
this.address = address;
|
||||
this.errorInfo = errorInfo;
|
||||
this.errorType = errorType;
|
||||
this.forbiddenChannels = forbiddenChannels;
|
||||
this.subAddresses = subAddresses;
|
||||
}
|
||||
|
||||
public Address getAddress() {
|
||||
return this.address;
|
||||
}
|
||||
|
||||
public void setAddress(Address address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getErrorInfo() {
|
||||
return this.errorInfo;
|
||||
}
|
||||
|
||||
public void setErrorInfo(String errorInfo) {
|
||||
this.errorInfo = errorInfo;
|
||||
}
|
||||
|
||||
public int getErrorType() {
|
||||
return this.errorType;
|
||||
}
|
||||
|
||||
public void setErrorType(int errorType) {
|
||||
this.errorType = errorType;
|
||||
}
|
||||
|
||||
public Channel[] getForbiddenChannels() {
|
||||
return this.forbiddenChannels;
|
||||
}
|
||||
|
||||
public void setForbiddenChannels(Channel[] forbiddenChannels) {
|
||||
this.forbiddenChannels = forbiddenChannels;
|
||||
}
|
||||
|
||||
public Channel getForbiddenChannels(int i) {
|
||||
return this.forbiddenChannels[i];
|
||||
}
|
||||
|
||||
public void setForbiddenChannels(int i, Channel _value) {
|
||||
this.forbiddenChannels[i] = _value;
|
||||
}
|
||||
|
||||
public Address[] getSubAddresses() {
|
||||
return this.subAddresses;
|
||||
}
|
||||
|
||||
public void setSubAddresses(Address[] subAddresses) {
|
||||
this.subAddresses = subAddresses;
|
||||
}
|
||||
|
||||
public Address getSubAddresses(int i) {
|
||||
return this.subAddresses[i];
|
||||
}
|
||||
|
||||
public void setSubAddresses(int i, Address _value) {
|
||||
this.subAddresses[i] = _value;
|
||||
}
|
||||
|
||||
public synchronized boolean equals(Object obj) {
|
||||
if (!(obj instanceof WrongAddress)) {
|
||||
return false;
|
||||
} else {
|
||||
WrongAddress other = (WrongAddress)obj;
|
||||
if (obj == null) {
|
||||
return false;
|
||||
} else if (this == obj) {
|
||||
return true;
|
||||
} else if (this.__equalsCalc != null) {
|
||||
return this.__equalsCalc == obj;
|
||||
} else {
|
||||
this.__equalsCalc = obj;
|
||||
boolean _equals = (this.address == null && other.getAddress() == null || this.address != null && this.address.equals(other.getAddress())) && (this.errorInfo == null && other.getErrorInfo() == null || this.errorInfo != null && this.errorInfo.equals(other.getErrorInfo())) && this.errorType == other.getErrorType() && (this.forbiddenChannels == null && other.getForbiddenChannels() == null || this.forbiddenChannels != null && Arrays.equals(this.forbiddenChannels, other.getForbiddenChannels())) && (this.subAddresses == null && other.getSubAddresses() == null || this.subAddresses != null && Arrays.equals(this.subAddresses, other.getSubAddresses()));
|
||||
this.__equalsCalc = null;
|
||||
return _equals;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized int hashCode() {
|
||||
if (this.__hashCodeCalc) {
|
||||
return 0;
|
||||
} else {
|
||||
this.__hashCodeCalc = true;
|
||||
int _hashCode = 1;
|
||||
if (this.getAddress() != null) {
|
||||
_hashCode += this.getAddress().hashCode();
|
||||
}
|
||||
|
||||
if (this.getErrorInfo() != null) {
|
||||
_hashCode += this.getErrorInfo().hashCode();
|
||||
}
|
||||
|
||||
_hashCode += this.getErrorType();
|
||||
int i;
|
||||
Object obj;
|
||||
if (this.getForbiddenChannels() != null) {
|
||||
for(i = 0; i < Array.getLength(this.getForbiddenChannels()); ++i) {
|
||||
obj = Array.get(this.getForbiddenChannels(), i);
|
||||
if (obj != null && !obj.getClass().isArray()) {
|
||||
_hashCode += obj.hashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.getSubAddresses() != null) {
|
||||
for(i = 0; i < Array.getLength(this.getSubAddresses()); ++i) {
|
||||
obj = Array.get(this.getSubAddresses(), i);
|
||||
if (obj != null && !obj.getClass().isArray()) {
|
||||
_hashCode += obj.hashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.__hashCodeCalc = false;
|
||||
return _hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
public static TypeDesc getTypeDesc() {
|
||||
return typeDesc;
|
||||
}
|
||||
|
||||
public static Serializer getSerializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanSerializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
public static Deserializer getDeserializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanDeserializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
static {
|
||||
typeDesc.setXmlType(new QName("http://serv.ucp.sudytech.com/", "wrongAddress"));
|
||||
ElementDesc elemField = new ElementDesc();
|
||||
elemField.setFieldName("address");
|
||||
elemField.setXmlName(new QName("", "address"));
|
||||
elemField.setXmlType(new QName("http://serv.ucp.sudytech.com/", "address"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("errorInfo");
|
||||
elemField.setXmlName(new QName("", "errorInfo"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("errorType");
|
||||
elemField.setXmlName(new QName("", "errorType"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "int"));
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("forbiddenChannels");
|
||||
elemField.setXmlName(new QName("", "forbiddenChannels"));
|
||||
elemField.setXmlType(new QName("http://serv.ucp.sudytech.com/", "channel"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(true);
|
||||
elemField.setMaxOccursUnbounded(true);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("subAddresses");
|
||||
elemField.setXmlName(new QName("", "subAddresses"));
|
||||
elemField.setXmlType(new QName("http://serv.ucp.sudytech.com/", "address"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(true);
|
||||
elemField.setMaxOccursUnbounded(true);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.ws;
|
||||
|
||||
import com.budwk.app.base.sms.impl.njupt.ucp.ws.client.msg.UcpMessage;
|
||||
import com.budwk.app.base.sms.impl.njupt.ucp.ws.client.msg.UcpMessageService_PortType;
|
||||
import com.budwk.app.base.sms.impl.njupt.ucp.ws.client.msg.UcpMessageService_Service;
|
||||
import com.budwk.app.base.sms.impl.njupt.ucp.ws.client.msg.UcpMessageService_ServiceLocator;
|
||||
|
||||
import java.net.URL;
|
||||
|
||||
public class MessageService {
|
||||
private String url;
|
||||
|
||||
public MessageService(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public UcpMessageService_PortType loadMessageServiceClient() throws Exception {
|
||||
UcpMessageService_Service service = new UcpMessageService_ServiceLocator();
|
||||
return service.getUcpMessageServicePort(new URL(this.url));
|
||||
}
|
||||
|
||||
public int findUnreadMessageCount(String loginName) throws Exception {
|
||||
return this.loadMessageServiceClient().findUnreadMessageCount(loginName);
|
||||
}
|
||||
|
||||
public UcpMessage[] findUnreadMessages(String loginName) throws Exception {
|
||||
return this.loadMessageServiceClient().findUnreadMessages(loginName, -1, -1);
|
||||
}
|
||||
|
||||
public UcpMessage[] findUnreadMessages(String loginName, int beginIndex, int count) throws Exception {
|
||||
return this.loadMessageServiceClient().findUnreadMessages(loginName, beginIndex, count);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.ws;
|
||||
|
||||
import com.budwk.app.base.sms.impl.njupt.ucp.ws.client.SmsService_PortType;
|
||||
import com.budwk.app.base.sms.impl.njupt.ucp.ws.client.SmsService_Service;
|
||||
import com.budwk.app.base.sms.impl.njupt.ucp.ws.client.SmsService_ServiceLocator;
|
||||
import com.budwk.app.base.sms.impl.njupt.ucp.ws.om.DeliverState;
|
||||
import com.budwk.app.base.sms.impl.njupt.ucp.ws.om.MessageState;
|
||||
import com.budwk.app.base.sms.impl.njupt.ucp.ws.om.SendResult;
|
||||
|
||||
import java.net.URL;
|
||||
|
||||
public class SmsMessageSender {
|
||||
private String url;
|
||||
|
||||
public SmsMessageSender(String path, String url) {
|
||||
this.url = url;
|
||||
System.setProperty("javax.net.ssl.keyStore", path);
|
||||
System.setProperty("javax.net.ssl.keyStorePassword", "changeit");
|
||||
System.setProperty("javax.net.ssl.keyStoreType", "PKCS12");
|
||||
}
|
||||
|
||||
private SmsService_PortType loadSmsClient() throws Exception {
|
||||
SmsService_Service service = new SmsService_ServiceLocator();
|
||||
return service.getSmsServicePort(new URL(this.url));
|
||||
}
|
||||
|
||||
public SendResult send(String context, String[] phones) throws Exception {
|
||||
SmsService_PortType client = this.loadSmsClient();
|
||||
return client.sendSmsMessage(context, phones);
|
||||
}
|
||||
|
||||
public DeliverState[] findSmsMessageDelivers(String messageId) throws Exception {
|
||||
SmsService_PortType client = this.loadSmsClient();
|
||||
return client.findSmsMessageDelivers(messageId);
|
||||
}
|
||||
|
||||
public MessageState[] findSmsMessageStates(String messageId) throws Exception {
|
||||
SmsService_PortType client = this.loadSmsClient();
|
||||
return client.findSmsMessageStates(messageId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.ws;
|
||||
|
||||
|
||||
import com.budwk.app.base.sms.impl.njupt.ucp.ws.client.one.SmsService1_PortType;
|
||||
import com.budwk.app.base.sms.impl.njupt.ucp.ws.client.one.SmsService1_Service;
|
||||
import com.budwk.app.base.sms.impl.njupt.ucp.ws.client.one.SmsService1_ServiceLocator;
|
||||
import com.budwk.app.base.sms.impl.njupt.ucp.ws.om.DeliverState;
|
||||
import com.budwk.app.base.sms.impl.njupt.ucp.ws.om.MessageState;
|
||||
import com.budwk.app.base.sms.impl.njupt.ucp.ws.om.SendResult;
|
||||
|
||||
import java.net.URL;
|
||||
|
||||
public class SmsMessageSender1 {
|
||||
private String url;
|
||||
private String username;
|
||||
private String password;
|
||||
|
||||
public SmsMessageSender1(String url, String username, String password) {
|
||||
this.url = url;
|
||||
this.username = username;
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
private SmsService1_PortType loadSmsClient() throws Exception {
|
||||
SmsService1_Service service = new SmsService1_ServiceLocator();
|
||||
return service.getSmsService1Port(new URL(this.url));
|
||||
}
|
||||
|
||||
public SendResult send(String context, String[] phones) throws Exception {
|
||||
SmsService1_PortType client = this.loadSmsClient();
|
||||
return client.sendSmsMessage(context, phones, this.username, this.password);
|
||||
}
|
||||
|
||||
public DeliverState[] findSmsMessageDelivers(String messageId) throws Exception {
|
||||
SmsService1_PortType client = this.loadSmsClient();
|
||||
return client.findSmsMessageDelivers(messageId, this.username, this.password);
|
||||
}
|
||||
|
||||
public MessageState[] findSmsMessageStates(String messageId) throws Exception {
|
||||
SmsService1_PortType client = this.loadSmsClient();
|
||||
return client.findSmsMessageStates(messageId, this.username, this.password);
|
||||
}
|
||||
}
|
||||
+350
@@ -0,0 +1,350 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.ws.client;
|
||||
|
||||
import com.budwk.app.base.sms.impl.njupt.ucp.ws.om.*;
|
||||
import org.apache.axis.AxisFault;
|
||||
import org.apache.axis.NoEndPointException;
|
||||
import org.apache.axis.client.Call;
|
||||
import org.apache.axis.client.Stub;
|
||||
import org.apache.axis.constants.Style;
|
||||
import org.apache.axis.constants.Use;
|
||||
import org.apache.axis.description.FaultDesc;
|
||||
import org.apache.axis.description.OperationDesc;
|
||||
import org.apache.axis.description.ParameterDesc;
|
||||
import org.apache.axis.encoding.DeserializerFactory;
|
||||
import org.apache.axis.encoding.ser.*;
|
||||
import org.apache.axis.soap.SOAPConstants;
|
||||
import org.apache.axis.utils.JavaUtils;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
import javax.xml.rpc.Service;
|
||||
import javax.xml.rpc.encoding.SerializerFactory;
|
||||
import java.net.URL;
|
||||
import java.rmi.RemoteException;
|
||||
import java.util.Enumeration;
|
||||
import java.util.Vector;
|
||||
|
||||
public class SmsServicePortBindingStub extends Stub implements SmsService_PortType {
|
||||
private Vector cachedSerClasses;
|
||||
private Vector cachedSerQNames;
|
||||
private Vector cachedSerFactories;
|
||||
private Vector cachedDeserFactories;
|
||||
static OperationDesc[] _operations = new OperationDesc[3];
|
||||
|
||||
private static void _initOperationDesc1() {
|
||||
OperationDesc oper = new OperationDesc();
|
||||
oper.setName("findSmsMessageDelivers");
|
||||
ParameterDesc param = new ParameterDesc(new QName("", "messageId"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
oper.setReturnType(new QName("http://api.ws.ucp.sudytech.com/", "deliverState"));
|
||||
oper.setReturnClass(DeliverState[].class);
|
||||
oper.setReturnQName(new QName("", "return"));
|
||||
oper.setStyle(Style.WRAPPED);
|
||||
oper.setUse(Use.LITERAL);
|
||||
oper.addFault(new FaultDesc(new QName("http://api.ws.ucp.sudytech.com/", "MessageException"), "com.sudytech.ucp.ws.om.MessageException", new QName("http://api.ws.ucp.sudytech.com/", "MessageException"), true));
|
||||
_operations[0] = oper;
|
||||
oper = new OperationDesc();
|
||||
oper.setName("sendSmsMessage");
|
||||
param = new ParameterDesc(new QName("", "content"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "addresses"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String[].class, false, false);
|
||||
oper.addParameter(param);
|
||||
oper.setReturnType(new QName("http://api.ws.ucp.sudytech.com/", "sendResult"));
|
||||
oper.setReturnClass(SendResult.class);
|
||||
oper.setReturnQName(new QName("", "return"));
|
||||
oper.setStyle(Style.WRAPPED);
|
||||
oper.setUse(Use.LITERAL);
|
||||
oper.addFault(new FaultDesc(new QName("http://api.ws.ucp.sudytech.com/", "MessageException"), "com.sudytech.ucp.ws.om.MessageException", new QName("http://api.ws.ucp.sudytech.com/", "MessageException"), true));
|
||||
_operations[1] = oper;
|
||||
oper = new OperationDesc();
|
||||
oper.setName("findSmsMessageStates");
|
||||
param = new ParameterDesc(new QName("", "messageId"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
oper.setReturnType(new QName("http://api.ws.ucp.sudytech.com/", "messageState"));
|
||||
oper.setReturnClass(MessageState[].class);
|
||||
oper.setReturnQName(new QName("", "return"));
|
||||
oper.setStyle(Style.WRAPPED);
|
||||
oper.setUse(Use.LITERAL);
|
||||
oper.addFault(new FaultDesc(new QName("http://api.ws.ucp.sudytech.com/", "MessageException"), "com.sudytech.ucp.ws.om.MessageException", new QName("http://api.ws.ucp.sudytech.com/", "MessageException"), true));
|
||||
_operations[2] = oper;
|
||||
}
|
||||
|
||||
public SmsServicePortBindingStub() throws AxisFault {
|
||||
this((Service)null);
|
||||
}
|
||||
|
||||
public SmsServicePortBindingStub(URL endpointURL, Service service) throws AxisFault {
|
||||
this(service);
|
||||
super.cachedEndpoint = endpointURL;
|
||||
}
|
||||
|
||||
public SmsServicePortBindingStub(Service service) throws AxisFault {
|
||||
this.cachedSerClasses = new Vector();
|
||||
this.cachedSerQNames = new Vector();
|
||||
this.cachedSerFactories = new Vector();
|
||||
this.cachedDeserFactories = new Vector();
|
||||
if (service == null) {
|
||||
super.service = new org.apache.axis.client.Service();
|
||||
} else {
|
||||
super.service = service;
|
||||
}
|
||||
|
||||
((org.apache.axis.client.Service)super.service).setTypeMappingVersion("1.2");
|
||||
Class beansf = BeanSerializerFactory.class;
|
||||
Class beandf = BeanDeserializerFactory.class;
|
||||
Class enumsf = EnumSerializerFactory.class;
|
||||
Class enumdf = EnumDeserializerFactory.class;
|
||||
Class arraysf = ArraySerializerFactory.class;
|
||||
Class arraydf = ArrayDeserializerFactory.class;
|
||||
Class simplesf = SimpleSerializerFactory.class;
|
||||
Class simpledf = SimpleDeserializerFactory.class;
|
||||
Class simplelistsf = SimpleListSerializerFactory.class;
|
||||
Class simplelistdf = SimpleListDeserializerFactory.class;
|
||||
QName qName = new QName("http://api.ws.ucp.sudytech.com/", ">>messageState>properties>entry");
|
||||
this.cachedSerQNames.add(qName);
|
||||
Class cls = MessageStatePropertiesEntry.class;
|
||||
this.cachedSerClasses.add(cls);
|
||||
this.cachedSerFactories.add(beansf);
|
||||
this.cachedDeserFactories.add(beandf);
|
||||
qName = new QName("http://api.ws.ucp.sudytech.com/", ">messageState>properties");
|
||||
this.cachedSerQNames.add(qName);
|
||||
cls = MessageStateProperties.class;
|
||||
this.cachedSerClasses.add(cls);
|
||||
this.cachedSerFactories.add(beansf);
|
||||
this.cachedDeserFactories.add(beandf);
|
||||
qName = new QName("http://api.ws.ucp.sudytech.com/", "deliverState");
|
||||
this.cachedSerQNames.add(qName);
|
||||
cls = DeliverState.class;
|
||||
this.cachedSerClasses.add(cls);
|
||||
this.cachedSerFactories.add(beansf);
|
||||
this.cachedDeserFactories.add(beandf);
|
||||
qName = new QName("http://api.ws.ucp.sudytech.com/", "MessageException");
|
||||
this.cachedSerQNames.add(qName);
|
||||
cls = MessageException.class;
|
||||
this.cachedSerClasses.add(cls);
|
||||
this.cachedSerFactories.add(beansf);
|
||||
this.cachedDeserFactories.add(beandf);
|
||||
qName = new QName("http://api.ws.ucp.sudytech.com/", "messageState");
|
||||
this.cachedSerQNames.add(qName);
|
||||
cls = MessageState.class;
|
||||
this.cachedSerClasses.add(cls);
|
||||
this.cachedSerFactories.add(beansf);
|
||||
this.cachedDeserFactories.add(beandf);
|
||||
qName = new QName("http://api.ws.ucp.sudytech.com/", "sendResult");
|
||||
this.cachedSerQNames.add(qName);
|
||||
cls = SendResult.class;
|
||||
this.cachedSerClasses.add(cls);
|
||||
this.cachedSerFactories.add(beansf);
|
||||
this.cachedDeserFactories.add(beandf);
|
||||
qName = new QName("http://api.ws.ucp.sudytech.com/", "wrongAddress");
|
||||
this.cachedSerQNames.add(qName);
|
||||
cls = WrongAddress.class;
|
||||
this.cachedSerClasses.add(cls);
|
||||
this.cachedSerFactories.add(beansf);
|
||||
this.cachedDeserFactories.add(beandf);
|
||||
}
|
||||
|
||||
protected Call createCall() throws RemoteException {
|
||||
try {
|
||||
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);
|
||||
}
|
||||
|
||||
Enumeration keys = super.cachedProperties.keys();
|
||||
|
||||
while(keys.hasMoreElements()) {
|
||||
String key = (String)keys.nextElement();
|
||||
_call.setProperty(key, super.cachedProperties.get(key));
|
||||
}
|
||||
|
||||
synchronized(this) {
|
||||
if (this.firstCall()) {
|
||||
_call.setEncodingStyle((String)null);
|
||||
|
||||
for(int i = 0; i < this.cachedSerFactories.size(); ++i) {
|
||||
Class cls = (Class)this.cachedSerClasses.get(i);
|
||||
QName qName = (QName)this.cachedSerQNames.get(i);
|
||||
Object x = this.cachedSerFactories.get(i);
|
||||
if (x instanceof Class) {
|
||||
Class sf = (Class)this.cachedSerFactories.get(i);
|
||||
Class df = (Class)this.cachedDeserFactories.get(i);
|
||||
_call.registerTypeMapping(cls, qName, sf, df, false);
|
||||
} else if (x instanceof SerializerFactory) {
|
||||
org.apache.axis.encoding.SerializerFactory sf = (org.apache.axis.encoding.SerializerFactory)this.cachedSerFactories.get(i);
|
||||
DeserializerFactory df = (DeserializerFactory)this.cachedDeserFactories.get(i);
|
||||
_call.registerTypeMapping(cls, qName, sf, df, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return _call;
|
||||
} catch (Throwable var12) {
|
||||
throw new AxisFault("Failure trying to get the Call object", var12);
|
||||
}
|
||||
}
|
||||
|
||||
public DeliverState[] findSmsMessageDelivers(String messageId) throws RemoteException, MessageException {
|
||||
if (super.cachedEndpoint == null) {
|
||||
throw new NoEndPointException();
|
||||
} else {
|
||||
Call _call = this.createCall();
|
||||
_call.setOperation(_operations[0]);
|
||||
_call.setUseSOAPAction(true);
|
||||
_call.setSOAPActionURI("");
|
||||
_call.setEncodingStyle((String)null);
|
||||
_call.setProperty("sendXsiTypes", Boolean.FALSE);
|
||||
_call.setProperty("sendMultiRefs", Boolean.FALSE);
|
||||
_call.setSOAPVersion(SOAPConstants.SOAP11_CONSTANTS);
|
||||
_call.setOperationName(new QName("http://api.ws.ucp.sudytech.com/", "findSmsMessageDelivers"));
|
||||
this.setRequestHeaders(_call);
|
||||
this.setAttachments(_call);
|
||||
|
||||
try {
|
||||
Object _resp = _call.invoke(new Object[]{messageId});
|
||||
if (_resp instanceof RemoteException) {
|
||||
throw (RemoteException)_resp;
|
||||
} else {
|
||||
this.extractAttachments(_call);
|
||||
|
||||
try {
|
||||
return (DeliverState[])((DeliverState[])_resp);
|
||||
} catch (Exception var5) {
|
||||
return (DeliverState[])((DeliverState[])JavaUtils.convert(_resp, DeliverState[].class));
|
||||
}
|
||||
}
|
||||
} catch (AxisFault var6) {
|
||||
if (var6.detail != null) {
|
||||
if (var6.detail instanceof RemoteException) {
|
||||
throw (RemoteException)var6.detail;
|
||||
}
|
||||
|
||||
if (var6.detail instanceof MessageException) {
|
||||
throw (MessageException)var6.detail;
|
||||
}
|
||||
}
|
||||
|
||||
throw var6;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public SendResult sendSmsMessage(String content, String[] addresses) throws RemoteException, MessageException {
|
||||
if (super.cachedEndpoint == null) {
|
||||
throw new NoEndPointException();
|
||||
} else {
|
||||
Call _call = this.createCall();
|
||||
_call.setOperation(_operations[1]);
|
||||
_call.setUseSOAPAction(true);
|
||||
_call.setSOAPActionURI("");
|
||||
_call.setEncodingStyle((String)null);
|
||||
_call.setProperty("sendXsiTypes", Boolean.FALSE);
|
||||
_call.setProperty("sendMultiRefs", Boolean.FALSE);
|
||||
_call.setSOAPVersion(SOAPConstants.SOAP11_CONSTANTS);
|
||||
_call.setOperationName(new QName("http://api.ws.ucp.sudytech.com/", "sendSmsMessage"));
|
||||
this.setRequestHeaders(_call);
|
||||
this.setAttachments(_call);
|
||||
|
||||
try {
|
||||
Object _resp = _call.invoke(new Object[]{content, addresses});
|
||||
if (_resp instanceof RemoteException) {
|
||||
throw (RemoteException)_resp;
|
||||
} else {
|
||||
this.extractAttachments(_call);
|
||||
|
||||
try {
|
||||
return (SendResult)_resp;
|
||||
} catch (Exception var6) {
|
||||
return (SendResult)JavaUtils.convert(_resp, SendResult.class);
|
||||
}
|
||||
}
|
||||
} catch (AxisFault var7) {
|
||||
if (var7.detail != null) {
|
||||
if (var7.detail instanceof RemoteException) {
|
||||
throw (RemoteException)var7.detail;
|
||||
}
|
||||
|
||||
if (var7.detail instanceof MessageException) {
|
||||
throw (MessageException)var7.detail;
|
||||
}
|
||||
}
|
||||
|
||||
throw var7;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public MessageState[] findSmsMessageStates(String messageId) throws RemoteException, MessageException {
|
||||
if (super.cachedEndpoint == null) {
|
||||
throw new NoEndPointException();
|
||||
} else {
|
||||
Call _call = this.createCall();
|
||||
_call.setOperation(_operations[2]);
|
||||
_call.setUseSOAPAction(true);
|
||||
_call.setSOAPActionURI("");
|
||||
_call.setEncodingStyle((String)null);
|
||||
_call.setProperty("sendXsiTypes", Boolean.FALSE);
|
||||
_call.setProperty("sendMultiRefs", Boolean.FALSE);
|
||||
_call.setSOAPVersion(SOAPConstants.SOAP11_CONSTANTS);
|
||||
_call.setOperationName(new QName("http://api.ws.ucp.sudytech.com/", "findSmsMessageStates"));
|
||||
this.setRequestHeaders(_call);
|
||||
this.setAttachments(_call);
|
||||
|
||||
try {
|
||||
Object _resp = _call.invoke(new Object[]{messageId});
|
||||
if (_resp instanceof RemoteException) {
|
||||
throw (RemoteException)_resp;
|
||||
} else {
|
||||
this.extractAttachments(_call);
|
||||
|
||||
try {
|
||||
return (MessageState[])((MessageState[])_resp);
|
||||
} catch (Exception var5) {
|
||||
return (MessageState[])((MessageState[])JavaUtils.convert(_resp, MessageState[].class));
|
||||
}
|
||||
}
|
||||
} catch (AxisFault var6) {
|
||||
if (var6.detail != null) {
|
||||
if (var6.detail instanceof RemoteException) {
|
||||
throw (RemoteException)var6.detail;
|
||||
}
|
||||
|
||||
if (var6.detail instanceof MessageException) {
|
||||
throw (MessageException)var6.detail;
|
||||
}
|
||||
}
|
||||
|
||||
throw var6;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static {
|
||||
_initOperationDesc1();
|
||||
}
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.ws.client;
|
||||
|
||||
import com.budwk.app.base.sms.impl.njupt.ucp.ws.om.DeliverState;
|
||||
import com.budwk.app.base.sms.impl.njupt.ucp.ws.om.MessageException;
|
||||
import com.budwk.app.base.sms.impl.njupt.ucp.ws.om.MessageState;
|
||||
import com.budwk.app.base.sms.impl.njupt.ucp.ws.om.SendResult;
|
||||
|
||||
import java.rmi.Remote;
|
||||
import java.rmi.RemoteException;
|
||||
|
||||
public interface SmsService_PortType extends Remote {
|
||||
DeliverState[] findSmsMessageDelivers(String var1) throws RemoteException, MessageException;
|
||||
|
||||
SendResult sendSmsMessage(String var1, String[] var2) throws RemoteException, MessageException;
|
||||
|
||||
MessageState[] findSmsMessageStates(String var1) throws RemoteException, MessageException;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.ws.client;
|
||||
|
||||
import javax.xml.rpc.Service;
|
||||
import javax.xml.rpc.ServiceException;
|
||||
import java.net.URL;
|
||||
|
||||
public interface SmsService_Service extends Service {
|
||||
String getSmsServicePortAddress();
|
||||
|
||||
SmsService_PortType getSmsServicePort() throws ServiceException;
|
||||
|
||||
SmsService_PortType getSmsServicePort(URL var1) throws ServiceException;
|
||||
}
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.ws.client;
|
||||
|
||||
import org.apache.axis.AxisFault;
|
||||
import org.apache.axis.EngineConfiguration;
|
||||
import org.apache.axis.client.Service;
|
||||
import org.apache.axis.client.Stub;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
import javax.xml.rpc.ServiceException;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.rmi.Remote;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
|
||||
public class SmsService_ServiceLocator extends Service implements SmsService_Service {
|
||||
private String SmsServicePort_address = "http://172.18.10.32:8181/SmsService";
|
||||
private String SmsServicePortWSDDServiceName = "SmsServicePort";
|
||||
private HashSet ports = null;
|
||||
|
||||
public SmsService_ServiceLocator() {
|
||||
}
|
||||
|
||||
public SmsService_ServiceLocator(EngineConfiguration config) {
|
||||
super(config);
|
||||
}
|
||||
|
||||
public SmsService_ServiceLocator(String wsdlLoc, QName sName) throws ServiceException {
|
||||
super(wsdlLoc, sName);
|
||||
}
|
||||
|
||||
public String getSmsServicePortAddress() {
|
||||
return this.SmsServicePort_address;
|
||||
}
|
||||
|
||||
public String getSmsServicePortWSDDServiceName() {
|
||||
return this.SmsServicePortWSDDServiceName;
|
||||
}
|
||||
|
||||
public void setSmsServicePortWSDDServiceName(String name) {
|
||||
this.SmsServicePortWSDDServiceName = name;
|
||||
}
|
||||
|
||||
public SmsService_PortType getSmsServicePort() throws ServiceException {
|
||||
URL endpoint;
|
||||
try {
|
||||
endpoint = new URL(this.SmsServicePort_address);
|
||||
} catch (MalformedURLException var3) {
|
||||
throw new ServiceException(var3);
|
||||
}
|
||||
|
||||
return this.getSmsServicePort(endpoint);
|
||||
}
|
||||
|
||||
public SmsService_PortType getSmsServicePort(URL portAddress) throws ServiceException {
|
||||
try {
|
||||
SmsServicePortBindingStub _stub = new SmsServicePortBindingStub(portAddress, this);
|
||||
_stub.setPortName(this.getSmsServicePortWSDDServiceName());
|
||||
return _stub;
|
||||
} catch (AxisFault var3) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public void setSmsServicePortEndpointAddress(String address) {
|
||||
this.SmsServicePort_address = address;
|
||||
}
|
||||
|
||||
public Remote getPort(Class serviceEndpointInterface) throws ServiceException {
|
||||
try {
|
||||
if (SmsService_PortType.class.isAssignableFrom(serviceEndpointInterface)) {
|
||||
SmsServicePortBindingStub _stub = new SmsServicePortBindingStub(new URL(this.SmsServicePort_address), this);
|
||||
_stub.setPortName(this.getSmsServicePortWSDDServiceName());
|
||||
return _stub;
|
||||
}
|
||||
} catch (Throwable var3) {
|
||||
throw new ServiceException(var3);
|
||||
}
|
||||
|
||||
throw new ServiceException("There is no stub implementation for the interface: " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
|
||||
}
|
||||
|
||||
public Remote getPort(QName portName, Class serviceEndpointInterface) throws ServiceException {
|
||||
if (portName == null) {
|
||||
return this.getPort(serviceEndpointInterface);
|
||||
} else {
|
||||
String inputPortName = portName.getLocalPart();
|
||||
if ("SmsServicePort".equals(inputPortName)) {
|
||||
return this.getSmsServicePort();
|
||||
} else {
|
||||
Remote _stub = this.getPort(serviceEndpointInterface);
|
||||
((Stub)_stub).setPortName(portName);
|
||||
return _stub;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public QName getServiceName() {
|
||||
return new QName("http://api.ws.ucp.sudytech.com/", "SmsService");
|
||||
}
|
||||
|
||||
public Iterator getPorts() {
|
||||
if (this.ports == null) {
|
||||
this.ports = new HashSet();
|
||||
this.ports.add(new QName("http://api.ws.ucp.sudytech.com/", "SmsServicePort"));
|
||||
}
|
||||
|
||||
return this.ports.iterator();
|
||||
}
|
||||
|
||||
public void setEndpointAddress(String portName, String address) throws ServiceException {
|
||||
if ("SmsServicePort".equals(portName)) {
|
||||
this.setSmsServicePortEndpointAddress(address);
|
||||
} else {
|
||||
throw new ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
|
||||
}
|
||||
}
|
||||
|
||||
public void setEndpointAddress(QName portName, String address) throws ServiceException {
|
||||
this.setEndpointAddress(portName.getLocalPart(), address);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,217 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.ws.client.msg;
|
||||
|
||||
import org.apache.axis.description.ElementDesc;
|
||||
import org.apache.axis.description.TypeDesc;
|
||||
import org.apache.axis.encoding.Deserializer;
|
||||
import org.apache.axis.encoding.Serializer;
|
||||
import org.apache.axis.encoding.ser.BeanDeserializer;
|
||||
import org.apache.axis.encoding.ser.BeanSerializer;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
import java.io.Serializable;
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class UcpMessage implements Serializable {
|
||||
private String content;
|
||||
private String createTime;
|
||||
private String id;
|
||||
private String[] properties;
|
||||
private String sender;
|
||||
private String subject;
|
||||
private Object __equalsCalc = null;
|
||||
private boolean __hashCodeCalc = false;
|
||||
private static TypeDesc typeDesc = new TypeDesc(UcpMessage.class, true);
|
||||
|
||||
public UcpMessage() {
|
||||
}
|
||||
|
||||
public UcpMessage(String content, String createTime, String id, String[] properties, String sender, String subject) {
|
||||
this.content = content;
|
||||
this.createTime = createTime;
|
||||
this.id = id;
|
||||
this.properties = properties;
|
||||
this.sender = sender;
|
||||
this.subject = subject;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return this.content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return this.createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String[] getProperties() {
|
||||
return this.properties;
|
||||
}
|
||||
|
||||
public void setProperties(String[] properties) {
|
||||
this.properties = properties;
|
||||
}
|
||||
|
||||
public String getProperties(int i) {
|
||||
return this.properties[i];
|
||||
}
|
||||
|
||||
public void setProperties(int i, String _value) {
|
||||
this.properties[i] = _value;
|
||||
}
|
||||
|
||||
public String getSender() {
|
||||
return this.sender;
|
||||
}
|
||||
|
||||
public void setSender(String sender) {
|
||||
this.sender = sender;
|
||||
}
|
||||
|
||||
public String getSubject() {
|
||||
return this.subject;
|
||||
}
|
||||
|
||||
public void setSubject(String subject) {
|
||||
this.subject = subject;
|
||||
}
|
||||
|
||||
public synchronized boolean equals(Object obj) {
|
||||
if (!(obj instanceof UcpMessage)) {
|
||||
return false;
|
||||
} else {
|
||||
UcpMessage other = (UcpMessage)obj;
|
||||
if (obj == null) {
|
||||
return false;
|
||||
} else if (this == obj) {
|
||||
return true;
|
||||
} else if (this.__equalsCalc != null) {
|
||||
return this.__equalsCalc == obj;
|
||||
} else {
|
||||
this.__equalsCalc = obj;
|
||||
boolean _equals = (this.content == null && other.getContent() == null || this.content != null && this.content.equals(other.getContent())) && (this.createTime == null && other.getCreateTime() == null || this.createTime != null && this.createTime.equals(other.getCreateTime())) && (this.id == null && other.getId() == null || this.id != null && this.id.equals(other.getId())) && (this.properties == null && other.getProperties() == null || this.properties != null && Arrays.equals(this.properties, other.getProperties())) && (this.sender == null && other.getSender() == null || this.sender != null && this.sender.equals(other.getSender())) && (this.subject == null && other.getSubject() == null || this.subject != null && this.subject.equals(other.getSubject()));
|
||||
this.__equalsCalc = null;
|
||||
return _equals;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized int hashCode() {
|
||||
if (this.__hashCodeCalc) {
|
||||
return 0;
|
||||
} else {
|
||||
this.__hashCodeCalc = true;
|
||||
int _hashCode = 1;
|
||||
if (this.getContent() != null) {
|
||||
_hashCode += this.getContent().hashCode();
|
||||
}
|
||||
|
||||
if (this.getCreateTime() != null) {
|
||||
_hashCode += this.getCreateTime().hashCode();
|
||||
}
|
||||
|
||||
if (this.getId() != null) {
|
||||
_hashCode += this.getId().hashCode();
|
||||
}
|
||||
|
||||
if (this.getProperties() != null) {
|
||||
for(int i = 0; i < Array.getLength(this.getProperties()); ++i) {
|
||||
Object obj = Array.get(this.getProperties(), i);
|
||||
if (obj != null && !obj.getClass().isArray()) {
|
||||
_hashCode += obj.hashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.getSender() != null) {
|
||||
_hashCode += this.getSender().hashCode();
|
||||
}
|
||||
|
||||
if (this.getSubject() != null) {
|
||||
_hashCode += this.getSubject().hashCode();
|
||||
}
|
||||
|
||||
this.__hashCodeCalc = false;
|
||||
return _hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
public static TypeDesc getTypeDesc() {
|
||||
return typeDesc;
|
||||
}
|
||||
|
||||
public static Serializer getSerializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanSerializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
public static Deserializer getDeserializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanDeserializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
static {
|
||||
typeDesc.setXmlType(new QName("http://api.ws.ucp.sudytech.com/", "ucpMessage"));
|
||||
ElementDesc elemField = new ElementDesc();
|
||||
elemField.setFieldName("content");
|
||||
elemField.setXmlName(new QName("", "content"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("createTime");
|
||||
elemField.setXmlName(new QName("", "createTime"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("id");
|
||||
elemField.setXmlName(new QName("", "id"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("properties");
|
||||
elemField.setXmlName(new QName("", "properties"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(true);
|
||||
elemField.setMaxOccursUnbounded(true);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("sender");
|
||||
elemField.setXmlName(new QName("", "sender"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("subject");
|
||||
elemField.setXmlName(new QName("", "subject"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
}
|
||||
}
|
||||
+236
@@ -0,0 +1,236 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.ws.client.msg;
|
||||
|
||||
import org.apache.axis.AxisFault;
|
||||
import org.apache.axis.NoEndPointException;
|
||||
import org.apache.axis.client.Call;
|
||||
import org.apache.axis.client.Stub;
|
||||
import org.apache.axis.constants.Style;
|
||||
import org.apache.axis.constants.Use;
|
||||
import org.apache.axis.description.OperationDesc;
|
||||
import org.apache.axis.description.ParameterDesc;
|
||||
import org.apache.axis.encoding.DeserializerFactory;
|
||||
import org.apache.axis.encoding.ser.*;
|
||||
import org.apache.axis.soap.SOAPConstants;
|
||||
import org.apache.axis.utils.JavaUtils;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
import javax.xml.rpc.Service;
|
||||
import javax.xml.rpc.encoding.SerializerFactory;
|
||||
import java.net.URL;
|
||||
import java.rmi.RemoteException;
|
||||
import java.util.Enumeration;
|
||||
import java.util.Vector;
|
||||
|
||||
public class UcpMessageServicePortBindingStub extends Stub implements UcpMessageService_PortType {
|
||||
private Vector cachedSerClasses;
|
||||
private Vector cachedSerQNames;
|
||||
private Vector cachedSerFactories;
|
||||
private Vector cachedDeserFactories;
|
||||
static OperationDesc[] _operations = new OperationDesc[2];
|
||||
|
||||
private static void _initOperationDesc1() {
|
||||
OperationDesc oper = new OperationDesc();
|
||||
oper.setName("findUnreadMessageCount");
|
||||
ParameterDesc param = new ParameterDesc(new QName("", "arg0"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
oper.setReturnType(new QName("http://www.w3.org/2001/XMLSchema", "int"));
|
||||
oper.setReturnClass(Integer.TYPE);
|
||||
oper.setReturnQName(new QName("", "return"));
|
||||
oper.setStyle(Style.WRAPPED);
|
||||
oper.setUse(Use.LITERAL);
|
||||
_operations[0] = oper;
|
||||
oper = new OperationDesc();
|
||||
oper.setName("findUnreadMessages");
|
||||
param = new ParameterDesc(new QName("", "arg0"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "arg1"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "int"), Integer.TYPE, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "arg2"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "int"), Integer.TYPE, false, false);
|
||||
oper.addParameter(param);
|
||||
oper.setReturnType(new QName("http://api.ws.ucp.sudytech.com/", "ucpMessage"));
|
||||
oper.setReturnClass(UcpMessage[].class);
|
||||
oper.setReturnQName(new QName("", "return"));
|
||||
oper.setStyle(Style.WRAPPED);
|
||||
oper.setUse(Use.LITERAL);
|
||||
_operations[1] = oper;
|
||||
}
|
||||
|
||||
public UcpMessageServicePortBindingStub() throws AxisFault {
|
||||
this((Service)null);
|
||||
}
|
||||
|
||||
public UcpMessageServicePortBindingStub(URL endpointURL, Service service) throws AxisFault {
|
||||
this(service);
|
||||
super.cachedEndpoint = endpointURL;
|
||||
}
|
||||
|
||||
public UcpMessageServicePortBindingStub(Service service) throws AxisFault {
|
||||
this.cachedSerClasses = new Vector();
|
||||
this.cachedSerQNames = new Vector();
|
||||
this.cachedSerFactories = new Vector();
|
||||
this.cachedDeserFactories = new Vector();
|
||||
if (service == null) {
|
||||
super.service = new org.apache.axis.client.Service();
|
||||
} else {
|
||||
super.service = service;
|
||||
}
|
||||
|
||||
((org.apache.axis.client.Service)super.service).setTypeMappingVersion("1.2");
|
||||
Class beansf = BeanSerializerFactory.class;
|
||||
Class beandf = BeanDeserializerFactory.class;
|
||||
Class enumsf = EnumSerializerFactory.class;
|
||||
Class enumdf = EnumDeserializerFactory.class;
|
||||
Class arraysf = ArraySerializerFactory.class;
|
||||
Class arraydf = ArrayDeserializerFactory.class;
|
||||
Class simplesf = SimpleSerializerFactory.class;
|
||||
Class simpledf = SimpleDeserializerFactory.class;
|
||||
Class simplelistsf = SimpleListSerializerFactory.class;
|
||||
Class simplelistdf = SimpleListDeserializerFactory.class;
|
||||
QName qName = new QName("http://api.ws.ucp.sudytech.com/", "ucpMessage");
|
||||
this.cachedSerQNames.add(qName);
|
||||
Class cls = UcpMessage.class;
|
||||
this.cachedSerClasses.add(cls);
|
||||
this.cachedSerFactories.add(beansf);
|
||||
this.cachedDeserFactories.add(beandf);
|
||||
}
|
||||
|
||||
protected Call createCall() throws RemoteException {
|
||||
try {
|
||||
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);
|
||||
}
|
||||
|
||||
Enumeration keys = super.cachedProperties.keys();
|
||||
|
||||
while(keys.hasMoreElements()) {
|
||||
String key = (String)keys.nextElement();
|
||||
_call.setProperty(key, super.cachedProperties.get(key));
|
||||
}
|
||||
|
||||
synchronized(this) {
|
||||
if (this.firstCall()) {
|
||||
_call.setEncodingStyle((String)null);
|
||||
|
||||
for(int i = 0; i < this.cachedSerFactories.size(); ++i) {
|
||||
Class cls = (Class)this.cachedSerClasses.get(i);
|
||||
QName qName = (QName)this.cachedSerQNames.get(i);
|
||||
Object x = this.cachedSerFactories.get(i);
|
||||
if (x instanceof Class) {
|
||||
Class sf = (Class)this.cachedSerFactories.get(i);
|
||||
Class df = (Class)this.cachedDeserFactories.get(i);
|
||||
_call.registerTypeMapping(cls, qName, sf, df, false);
|
||||
} else if (x instanceof SerializerFactory) {
|
||||
org.apache.axis.encoding.SerializerFactory sf = (org.apache.axis.encoding.SerializerFactory)this.cachedSerFactories.get(i);
|
||||
DeserializerFactory df = (DeserializerFactory)this.cachedDeserFactories.get(i);
|
||||
_call.registerTypeMapping(cls, qName, sf, df, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return _call;
|
||||
} catch (Throwable var12) {
|
||||
throw new AxisFault("Failure trying to get the Call object", var12);
|
||||
}
|
||||
}
|
||||
|
||||
public int findUnreadMessageCount(String arg0) throws RemoteException {
|
||||
if (super.cachedEndpoint == null) {
|
||||
throw new NoEndPointException();
|
||||
} else {
|
||||
Call _call = this.createCall();
|
||||
_call.setOperation(_operations[0]);
|
||||
_call.setUseSOAPAction(true);
|
||||
_call.setSOAPActionURI("");
|
||||
_call.setEncodingStyle((String)null);
|
||||
_call.setProperty("sendXsiTypes", Boolean.FALSE);
|
||||
_call.setProperty("sendMultiRefs", Boolean.FALSE);
|
||||
_call.setSOAPVersion(SOAPConstants.SOAP11_CONSTANTS);
|
||||
_call.setOperationName(new QName("http://api.ws.ucp.sudytech.com/", "findUnreadMessageCount"));
|
||||
this.setRequestHeaders(_call);
|
||||
this.setAttachments(_call);
|
||||
|
||||
try {
|
||||
Object _resp = _call.invoke(new Object[]{arg0});
|
||||
if (_resp instanceof RemoteException) {
|
||||
throw (RemoteException)_resp;
|
||||
} else {
|
||||
this.extractAttachments(_call);
|
||||
|
||||
try {
|
||||
return (Integer)_resp;
|
||||
} catch (Exception var5) {
|
||||
return (Integer)JavaUtils.convert(_resp, Integer.TYPE);
|
||||
}
|
||||
}
|
||||
} catch (AxisFault var6) {
|
||||
throw var6;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public UcpMessage[] findUnreadMessages(String arg0, int arg1, int arg2) throws RemoteException {
|
||||
if (super.cachedEndpoint == null) {
|
||||
throw new NoEndPointException();
|
||||
} else {
|
||||
Call _call = this.createCall();
|
||||
_call.setOperation(_operations[1]);
|
||||
_call.setUseSOAPAction(true);
|
||||
_call.setSOAPActionURI("");
|
||||
_call.setEncodingStyle((String)null);
|
||||
_call.setProperty("sendXsiTypes", Boolean.FALSE);
|
||||
_call.setProperty("sendMultiRefs", Boolean.FALSE);
|
||||
_call.setSOAPVersion(SOAPConstants.SOAP11_CONSTANTS);
|
||||
_call.setOperationName(new QName("http://api.ws.ucp.sudytech.com/", "findUnreadMessages"));
|
||||
this.setRequestHeaders(_call);
|
||||
this.setAttachments(_call);
|
||||
|
||||
try {
|
||||
Object _resp = _call.invoke(new Object[]{arg0, new Integer(arg1), new Integer(arg2)});
|
||||
if (_resp instanceof RemoteException) {
|
||||
throw (RemoteException)_resp;
|
||||
} else {
|
||||
this.extractAttachments(_call);
|
||||
|
||||
try {
|
||||
return (UcpMessage[])((UcpMessage[])_resp);
|
||||
} catch (Exception var7) {
|
||||
return (UcpMessage[])((UcpMessage[])JavaUtils.convert(_resp, UcpMessage[].class));
|
||||
}
|
||||
}
|
||||
} catch (AxisFault var8) {
|
||||
throw var8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static {
|
||||
_initOperationDesc1();
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.ws.client.msg;
|
||||
|
||||
import java.rmi.Remote;
|
||||
import java.rmi.RemoteException;
|
||||
|
||||
public interface UcpMessageService_PortType extends Remote {
|
||||
int findUnreadMessageCount(String var1) throws RemoteException;
|
||||
|
||||
UcpMessage[] findUnreadMessages(String var1, int var2, int var3) throws RemoteException;
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.ws.client.msg;
|
||||
|
||||
import javax.xml.rpc.Service;
|
||||
import javax.xml.rpc.ServiceException;
|
||||
import java.net.URL;
|
||||
|
||||
public interface UcpMessageService_Service extends Service {
|
||||
String getUcpMessageServicePortAddress();
|
||||
|
||||
UcpMessageService_PortType getUcpMessageServicePort() throws ServiceException;
|
||||
|
||||
UcpMessageService_PortType getUcpMessageServicePort(URL var1) throws ServiceException;
|
||||
}
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.ws.client.msg;
|
||||
|
||||
import org.apache.axis.AxisFault;
|
||||
import org.apache.axis.EngineConfiguration;
|
||||
import org.apache.axis.client.Service;
|
||||
import org.apache.axis.client.Stub;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
import javax.xml.rpc.ServiceException;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.rmi.Remote;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
|
||||
public class UcpMessageService_ServiceLocator extends Service implements UcpMessageService_Service {
|
||||
private String UcpMessageServicePort_address = "http://172.18.10.141:83/UcpMessageService";
|
||||
private String UcpMessageServicePortWSDDServiceName = "UcpMessageServicePort";
|
||||
private HashSet ports = null;
|
||||
|
||||
public UcpMessageService_ServiceLocator() {
|
||||
}
|
||||
|
||||
public UcpMessageService_ServiceLocator(EngineConfiguration config) {
|
||||
super(config);
|
||||
}
|
||||
|
||||
public UcpMessageService_ServiceLocator(String wsdlLoc, QName sName) throws ServiceException {
|
||||
super(wsdlLoc, sName);
|
||||
}
|
||||
|
||||
public String getUcpMessageServicePortAddress() {
|
||||
return this.UcpMessageServicePort_address;
|
||||
}
|
||||
|
||||
public String getUcpMessageServicePortWSDDServiceName() {
|
||||
return this.UcpMessageServicePortWSDDServiceName;
|
||||
}
|
||||
|
||||
public void setUcpMessageServicePortWSDDServiceName(String name) {
|
||||
this.UcpMessageServicePortWSDDServiceName = name;
|
||||
}
|
||||
|
||||
public UcpMessageService_PortType getUcpMessageServicePort() throws ServiceException {
|
||||
URL endpoint;
|
||||
try {
|
||||
endpoint = new URL(this.UcpMessageServicePort_address);
|
||||
} catch (MalformedURLException var3) {
|
||||
throw new ServiceException(var3);
|
||||
}
|
||||
|
||||
return this.getUcpMessageServicePort(endpoint);
|
||||
}
|
||||
|
||||
public UcpMessageService_PortType getUcpMessageServicePort(URL portAddress) throws ServiceException {
|
||||
try {
|
||||
UcpMessageServicePortBindingStub _stub = new UcpMessageServicePortBindingStub(portAddress, this);
|
||||
_stub.setPortName(this.getUcpMessageServicePortWSDDServiceName());
|
||||
return _stub;
|
||||
} catch (AxisFault var3) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public void setUcpMessageServicePortEndpointAddress(String address) {
|
||||
this.UcpMessageServicePort_address = address;
|
||||
}
|
||||
|
||||
public Remote getPort(Class serviceEndpointInterface) throws ServiceException {
|
||||
try {
|
||||
if (UcpMessageService_PortType.class.isAssignableFrom(serviceEndpointInterface)) {
|
||||
UcpMessageServicePortBindingStub _stub = new UcpMessageServicePortBindingStub(new URL(this.UcpMessageServicePort_address), this);
|
||||
_stub.setPortName(this.getUcpMessageServicePortWSDDServiceName());
|
||||
return _stub;
|
||||
}
|
||||
} catch (Throwable var3) {
|
||||
throw new ServiceException(var3);
|
||||
}
|
||||
|
||||
throw new ServiceException("There is no stub implementation for the interface: " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
|
||||
}
|
||||
|
||||
public Remote getPort(QName portName, Class serviceEndpointInterface) throws ServiceException {
|
||||
if (portName == null) {
|
||||
return this.getPort(serviceEndpointInterface);
|
||||
} else {
|
||||
String inputPortName = portName.getLocalPart();
|
||||
if ("UcpMessageServicePort".equals(inputPortName)) {
|
||||
return this.getUcpMessageServicePort();
|
||||
} else {
|
||||
Remote _stub = this.getPort(serviceEndpointInterface);
|
||||
((Stub)_stub).setPortName(portName);
|
||||
return _stub;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public QName getServiceName() {
|
||||
return new QName("http://api.ws.ucp.sudytech.com/", "UcpMessageService");
|
||||
}
|
||||
|
||||
public Iterator getPorts() {
|
||||
if (this.ports == null) {
|
||||
this.ports = new HashSet();
|
||||
this.ports.add(new QName("http://api.ws.ucp.sudytech.com/", "UcpMessageServicePort"));
|
||||
}
|
||||
|
||||
return this.ports.iterator();
|
||||
}
|
||||
|
||||
public void setEndpointAddress(String portName, String address) throws ServiceException {
|
||||
if ("UcpMessageServicePort".equals(portName)) {
|
||||
this.setUcpMessageServicePortEndpointAddress(address);
|
||||
} else {
|
||||
throw new ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
|
||||
}
|
||||
}
|
||||
|
||||
public void setEndpointAddress(QName portName, String address) throws ServiceException {
|
||||
this.setEndpointAddress(portName.getLocalPart(), address);
|
||||
}
|
||||
}
|
||||
+362
@@ -0,0 +1,362 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.ws.client.one;
|
||||
|
||||
import com.budwk.app.base.sms.impl.njupt.ucp.ws.om.*;
|
||||
import org.apache.axis.AxisFault;
|
||||
import org.apache.axis.NoEndPointException;
|
||||
import org.apache.axis.client.Call;
|
||||
import org.apache.axis.client.Stub;
|
||||
import org.apache.axis.constants.Style;
|
||||
import org.apache.axis.constants.Use;
|
||||
import org.apache.axis.description.FaultDesc;
|
||||
import org.apache.axis.description.OperationDesc;
|
||||
import org.apache.axis.description.ParameterDesc;
|
||||
import org.apache.axis.encoding.DeserializerFactory;
|
||||
import org.apache.axis.encoding.ser.*;
|
||||
import org.apache.axis.soap.SOAPConstants;
|
||||
import org.apache.axis.utils.JavaUtils;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
import javax.xml.rpc.Service;
|
||||
import javax.xml.rpc.encoding.SerializerFactory;
|
||||
import java.net.URL;
|
||||
import java.rmi.RemoteException;
|
||||
import java.util.Enumeration;
|
||||
import java.util.Vector;
|
||||
|
||||
public class SmsService1PortBindingStub extends Stub implements SmsService1_PortType {
|
||||
private Vector cachedSerClasses;
|
||||
private Vector cachedSerQNames;
|
||||
private Vector cachedSerFactories;
|
||||
private Vector cachedDeserFactories;
|
||||
static OperationDesc[] _operations = new OperationDesc[3];
|
||||
|
||||
private static void _initOperationDesc1() {
|
||||
OperationDesc oper = new OperationDesc();
|
||||
oper.setName("findSmsMessageDelivers");
|
||||
ParameterDesc param = new ParameterDesc(new QName("", "messageId"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "username"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "password"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
oper.setReturnType(new QName("http://api.ws.ucp.sudytech.com/", "deliverState"));
|
||||
oper.setReturnClass(DeliverState[].class);
|
||||
oper.setReturnQName(new QName("", "return"));
|
||||
oper.setStyle(Style.WRAPPED);
|
||||
oper.setUse(Use.LITERAL);
|
||||
oper.addFault(new FaultDesc(new QName("http://api.ws.ucp.sudytech.com/", "MessageException"), "com.sudytech.ucp.ws.om.MessageException", new QName("http://api.ws.ucp.sudytech.com/", "MessageException"), true));
|
||||
_operations[0] = oper;
|
||||
oper = new OperationDesc();
|
||||
oper.setName("sendSmsMessage");
|
||||
param = new ParameterDesc(new QName("", "content"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "addresses"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String[].class, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "username"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "password"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
oper.setReturnType(new QName("http://api.ws.ucp.sudytech.com/", "sendResult"));
|
||||
oper.setReturnClass(SendResult.class);
|
||||
oper.setReturnQName(new QName("", "return"));
|
||||
oper.setStyle(Style.WRAPPED);
|
||||
oper.setUse(Use.LITERAL);
|
||||
oper.addFault(new FaultDesc(new QName("http://api.ws.ucp.sudytech.com/", "MessageException"), "com.sudytech.ucp.ws.om.MessageException", new QName("http://api.ws.ucp.sudytech.com/", "MessageException"), true));
|
||||
_operations[1] = oper;
|
||||
oper = new OperationDesc();
|
||||
oper.setName("findSmsMessageStates");
|
||||
param = new ParameterDesc(new QName("", "messageId"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "username"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
param = new ParameterDesc(new QName("", "password"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
|
||||
oper.addParameter(param);
|
||||
oper.setReturnType(new QName("http://api.ws.ucp.sudytech.com/", "messageState"));
|
||||
oper.setReturnClass(MessageState[].class);
|
||||
oper.setReturnQName(new QName("", "return"));
|
||||
oper.setStyle(Style.WRAPPED);
|
||||
oper.setUse(Use.LITERAL);
|
||||
oper.addFault(new FaultDesc(new QName("http://api.ws.ucp.sudytech.com/", "MessageException"), "com.sudytech.ucp.ws.om.MessageException", new QName("http://api.ws.ucp.sudytech.com/", "MessageException"), true));
|
||||
_operations[2] = oper;
|
||||
}
|
||||
|
||||
public SmsService1PortBindingStub() throws AxisFault {
|
||||
this((Service)null);
|
||||
}
|
||||
|
||||
public SmsService1PortBindingStub(URL endpointURL, Service service) throws AxisFault {
|
||||
this(service);
|
||||
super.cachedEndpoint = endpointURL;
|
||||
}
|
||||
|
||||
public SmsService1PortBindingStub(Service service) throws AxisFault {
|
||||
this.cachedSerClasses = new Vector();
|
||||
this.cachedSerQNames = new Vector();
|
||||
this.cachedSerFactories = new Vector();
|
||||
this.cachedDeserFactories = new Vector();
|
||||
if (service == null) {
|
||||
super.service = new org.apache.axis.client.Service();
|
||||
} else {
|
||||
super.service = service;
|
||||
}
|
||||
|
||||
((org.apache.axis.client.Service)super.service).setTypeMappingVersion("1.2");
|
||||
Class beansf = BeanSerializerFactory.class;
|
||||
Class beandf = BeanDeserializerFactory.class;
|
||||
Class enumsf = EnumSerializerFactory.class;
|
||||
Class enumdf = EnumDeserializerFactory.class;
|
||||
Class arraysf = ArraySerializerFactory.class;
|
||||
Class arraydf = ArrayDeserializerFactory.class;
|
||||
Class simplesf = SimpleSerializerFactory.class;
|
||||
Class simpledf = SimpleDeserializerFactory.class;
|
||||
Class simplelistsf = SimpleListSerializerFactory.class;
|
||||
Class simplelistdf = SimpleListDeserializerFactory.class;
|
||||
QName qName = new QName("http://api.ws.ucp.sudytech.com/", ">>messageState>properties>entry");
|
||||
this.cachedSerQNames.add(qName);
|
||||
Class cls = MessageStatePropertiesEntry.class;
|
||||
this.cachedSerClasses.add(cls);
|
||||
this.cachedSerFactories.add(beansf);
|
||||
this.cachedDeserFactories.add(beandf);
|
||||
qName = new QName("http://api.ws.ucp.sudytech.com/", ">messageState>properties");
|
||||
this.cachedSerQNames.add(qName);
|
||||
cls = MessageStateProperties.class;
|
||||
this.cachedSerClasses.add(cls);
|
||||
this.cachedSerFactories.add(beansf);
|
||||
this.cachedDeserFactories.add(beandf);
|
||||
qName = new QName("http://api.ws.ucp.sudytech.com/", "deliverState");
|
||||
this.cachedSerQNames.add(qName);
|
||||
cls = DeliverState.class;
|
||||
this.cachedSerClasses.add(cls);
|
||||
this.cachedSerFactories.add(beansf);
|
||||
this.cachedDeserFactories.add(beandf);
|
||||
qName = new QName("http://api.ws.ucp.sudytech.com/", "MessageException");
|
||||
this.cachedSerQNames.add(qName);
|
||||
cls = MessageException.class;
|
||||
this.cachedSerClasses.add(cls);
|
||||
this.cachedSerFactories.add(beansf);
|
||||
this.cachedDeserFactories.add(beandf);
|
||||
qName = new QName("http://api.ws.ucp.sudytech.com/", "messageState");
|
||||
this.cachedSerQNames.add(qName);
|
||||
cls = MessageState.class;
|
||||
this.cachedSerClasses.add(cls);
|
||||
this.cachedSerFactories.add(beansf);
|
||||
this.cachedDeserFactories.add(beandf);
|
||||
qName = new QName("http://api.ws.ucp.sudytech.com/", "sendResult");
|
||||
this.cachedSerQNames.add(qName);
|
||||
cls = SendResult.class;
|
||||
this.cachedSerClasses.add(cls);
|
||||
this.cachedSerFactories.add(beansf);
|
||||
this.cachedDeserFactories.add(beandf);
|
||||
qName = new QName("http://api.ws.ucp.sudytech.com/", "wrongAddress");
|
||||
this.cachedSerQNames.add(qName);
|
||||
cls = WrongAddress.class;
|
||||
this.cachedSerClasses.add(cls);
|
||||
this.cachedSerFactories.add(beansf);
|
||||
this.cachedDeserFactories.add(beandf);
|
||||
}
|
||||
|
||||
protected Call createCall() throws RemoteException {
|
||||
try {
|
||||
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);
|
||||
}
|
||||
|
||||
Enumeration keys = super.cachedProperties.keys();
|
||||
|
||||
while(keys.hasMoreElements()) {
|
||||
String key = (String)keys.nextElement();
|
||||
_call.setProperty(key, super.cachedProperties.get(key));
|
||||
}
|
||||
|
||||
synchronized(this) {
|
||||
if (this.firstCall()) {
|
||||
_call.setEncodingStyle((String)null);
|
||||
|
||||
for(int i = 0; i < this.cachedSerFactories.size(); ++i) {
|
||||
Class cls = (Class)this.cachedSerClasses.get(i);
|
||||
QName qName = (QName)this.cachedSerQNames.get(i);
|
||||
Object x = this.cachedSerFactories.get(i);
|
||||
if (x instanceof Class) {
|
||||
Class sf = (Class)this.cachedSerFactories.get(i);
|
||||
Class df = (Class)this.cachedDeserFactories.get(i);
|
||||
_call.registerTypeMapping(cls, qName, sf, df, false);
|
||||
} else if (x instanceof SerializerFactory) {
|
||||
org.apache.axis.encoding.SerializerFactory sf = (org.apache.axis.encoding.SerializerFactory)this.cachedSerFactories.get(i);
|
||||
DeserializerFactory df = (DeserializerFactory)this.cachedDeserFactories.get(i);
|
||||
_call.registerTypeMapping(cls, qName, sf, df, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return _call;
|
||||
} catch (Throwable var12) {
|
||||
throw new AxisFault("Failure trying to get the Call object", var12);
|
||||
}
|
||||
}
|
||||
|
||||
public DeliverState[] findSmsMessageDelivers(String messageId, String username, String password) throws RemoteException, MessageException {
|
||||
if (super.cachedEndpoint == null) {
|
||||
throw new NoEndPointException();
|
||||
} else {
|
||||
Call _call = this.createCall();
|
||||
_call.setOperation(_operations[0]);
|
||||
_call.setUseSOAPAction(true);
|
||||
_call.setSOAPActionURI("");
|
||||
_call.setEncodingStyle((String)null);
|
||||
_call.setProperty("sendXsiTypes", Boolean.FALSE);
|
||||
_call.setProperty("sendMultiRefs", Boolean.FALSE);
|
||||
_call.setSOAPVersion(SOAPConstants.SOAP11_CONSTANTS);
|
||||
_call.setOperationName(new QName("http://api.ws.ucp.sudytech.com/", "findSmsMessageDelivers"));
|
||||
this.setRequestHeaders(_call);
|
||||
this.setAttachments(_call);
|
||||
|
||||
try {
|
||||
Object _resp = _call.invoke(new Object[]{messageId, username, password});
|
||||
if (_resp instanceof RemoteException) {
|
||||
throw (RemoteException)_resp;
|
||||
} else {
|
||||
this.extractAttachments(_call);
|
||||
|
||||
try {
|
||||
return (DeliverState[])((DeliverState[])_resp);
|
||||
} catch (Exception var7) {
|
||||
return (DeliverState[])((DeliverState[])JavaUtils.convert(_resp, DeliverState[].class));
|
||||
}
|
||||
}
|
||||
} catch (AxisFault var8) {
|
||||
if (var8.detail != null) {
|
||||
if (var8.detail instanceof RemoteException) {
|
||||
throw (RemoteException)var8.detail;
|
||||
}
|
||||
|
||||
if (var8.detail instanceof MessageException) {
|
||||
throw (MessageException)var8.detail;
|
||||
}
|
||||
}
|
||||
|
||||
throw var8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public SendResult sendSmsMessage(String content, String[] addresses, String username, String password) throws RemoteException, MessageException {
|
||||
if (super.cachedEndpoint == null) {
|
||||
throw new NoEndPointException();
|
||||
} else {
|
||||
Call _call = this.createCall();
|
||||
_call.setOperation(_operations[1]);
|
||||
_call.setUseSOAPAction(true);
|
||||
_call.setSOAPActionURI("");
|
||||
_call.setEncodingStyle((String)null);
|
||||
_call.setProperty("sendXsiTypes", Boolean.FALSE);
|
||||
_call.setProperty("sendMultiRefs", Boolean.FALSE);
|
||||
_call.setSOAPVersion(SOAPConstants.SOAP11_CONSTANTS);
|
||||
_call.setOperationName(new QName("http://api.ws.ucp.sudytech.com/", "sendSmsMessage"));
|
||||
this.setRequestHeaders(_call);
|
||||
this.setAttachments(_call);
|
||||
|
||||
try {
|
||||
Object _resp = _call.invoke(new Object[]{content, addresses, username, password});
|
||||
if (_resp instanceof RemoteException) {
|
||||
throw (RemoteException)_resp;
|
||||
} else {
|
||||
this.extractAttachments(_call);
|
||||
|
||||
try {
|
||||
return (SendResult)_resp;
|
||||
} catch (Exception var8) {
|
||||
return (SendResult)JavaUtils.convert(_resp, SendResult.class);
|
||||
}
|
||||
}
|
||||
} catch (AxisFault var9) {
|
||||
if (var9.detail != null) {
|
||||
if (var9.detail instanceof RemoteException) {
|
||||
throw (RemoteException)var9.detail;
|
||||
}
|
||||
|
||||
if (var9.detail instanceof MessageException) {
|
||||
throw (MessageException)var9.detail;
|
||||
}
|
||||
}
|
||||
|
||||
throw var9;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public MessageState[] findSmsMessageStates(String messageId, String username, String password) throws RemoteException, MessageException {
|
||||
if (super.cachedEndpoint == null) {
|
||||
throw new NoEndPointException();
|
||||
} else {
|
||||
Call _call = this.createCall();
|
||||
_call.setOperation(_operations[2]);
|
||||
_call.setUseSOAPAction(true);
|
||||
_call.setSOAPActionURI("");
|
||||
_call.setEncodingStyle((String)null);
|
||||
_call.setProperty("sendXsiTypes", Boolean.FALSE);
|
||||
_call.setProperty("sendMultiRefs", Boolean.FALSE);
|
||||
_call.setSOAPVersion(SOAPConstants.SOAP11_CONSTANTS);
|
||||
_call.setOperationName(new QName("http://api.ws.ucp.sudytech.com/", "findSmsMessageStates"));
|
||||
this.setRequestHeaders(_call);
|
||||
this.setAttachments(_call);
|
||||
|
||||
try {
|
||||
Object _resp = _call.invoke(new Object[]{messageId, username, password});
|
||||
if (_resp instanceof RemoteException) {
|
||||
throw (RemoteException)_resp;
|
||||
} else {
|
||||
this.extractAttachments(_call);
|
||||
|
||||
try {
|
||||
return (MessageState[])((MessageState[])_resp);
|
||||
} catch (Exception var7) {
|
||||
return (MessageState[])((MessageState[])JavaUtils.convert(_resp, MessageState[].class));
|
||||
}
|
||||
}
|
||||
} catch (AxisFault var8) {
|
||||
if (var8.detail != null) {
|
||||
if (var8.detail instanceof RemoteException) {
|
||||
throw (RemoteException)var8.detail;
|
||||
}
|
||||
|
||||
if (var8.detail instanceof MessageException) {
|
||||
throw (MessageException)var8.detail;
|
||||
}
|
||||
}
|
||||
|
||||
throw var8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static {
|
||||
_initOperationDesc1();
|
||||
}
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.ws.client.one;
|
||||
|
||||
import com.budwk.app.base.sms.impl.njupt.ucp.ws.om.DeliverState;
|
||||
import com.budwk.app.base.sms.impl.njupt.ucp.ws.om.MessageException;
|
||||
import com.budwk.app.base.sms.impl.njupt.ucp.ws.om.MessageState;
|
||||
import com.budwk.app.base.sms.impl.njupt.ucp.ws.om.SendResult;
|
||||
|
||||
import java.rmi.Remote;
|
||||
import java.rmi.RemoteException;
|
||||
|
||||
public interface SmsService1_PortType extends Remote {
|
||||
DeliverState[] findSmsMessageDelivers(String var1, String var2, String var3) throws RemoteException, MessageException;
|
||||
|
||||
SendResult sendSmsMessage(String var1, String[] var2, String var3, String var4) throws RemoteException, MessageException;
|
||||
|
||||
MessageState[] findSmsMessageStates(String var1, String var2, String var3) throws RemoteException, MessageException;
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.ws.client.one;
|
||||
|
||||
import javax.xml.rpc.Service;
|
||||
import javax.xml.rpc.ServiceException;
|
||||
import java.net.URL;
|
||||
|
||||
public interface SmsService1_Service extends Service {
|
||||
String getSmsService1PortAddress();
|
||||
|
||||
SmsService1_PortType getSmsService1Port() throws ServiceException;
|
||||
|
||||
SmsService1_PortType getSmsService1Port(URL var1) throws ServiceException;
|
||||
}
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.ws.client.one;
|
||||
|
||||
import org.apache.axis.AxisFault;
|
||||
import org.apache.axis.EngineConfiguration;
|
||||
import org.apache.axis.client.Service;
|
||||
import org.apache.axis.client.Stub;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
import javax.xml.rpc.ServiceException;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.rmi.Remote;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
|
||||
public class SmsService1_ServiceLocator extends Service implements SmsService1_Service {
|
||||
private String SmsService1Port_address = "http://172.18.10.32:8181/SmsService1";
|
||||
private String SmsService1PortWSDDServiceName = "SmsService1Port";
|
||||
private HashSet ports = null;
|
||||
|
||||
public SmsService1_ServiceLocator() {
|
||||
}
|
||||
|
||||
public SmsService1_ServiceLocator(EngineConfiguration config) {
|
||||
super(config);
|
||||
}
|
||||
|
||||
public SmsService1_ServiceLocator(String wsdlLoc, QName sName) throws ServiceException {
|
||||
super(wsdlLoc, sName);
|
||||
}
|
||||
|
||||
public String getSmsService1PortAddress() {
|
||||
return this.SmsService1Port_address;
|
||||
}
|
||||
|
||||
public String getSmsService1PortWSDDServiceName() {
|
||||
return this.SmsService1PortWSDDServiceName;
|
||||
}
|
||||
|
||||
public void setSmsService1PortWSDDServiceName(String name) {
|
||||
this.SmsService1PortWSDDServiceName = name;
|
||||
}
|
||||
|
||||
public SmsService1_PortType getSmsService1Port() throws ServiceException {
|
||||
URL endpoint;
|
||||
try {
|
||||
endpoint = new URL(this.SmsService1Port_address);
|
||||
} catch (MalformedURLException var3) {
|
||||
throw new ServiceException(var3);
|
||||
}
|
||||
|
||||
return this.getSmsService1Port(endpoint);
|
||||
}
|
||||
|
||||
public SmsService1_PortType getSmsService1Port(URL portAddress) throws ServiceException {
|
||||
try {
|
||||
SmsService1PortBindingStub _stub = new SmsService1PortBindingStub(portAddress, this);
|
||||
_stub.setPortName(this.getSmsService1PortWSDDServiceName());
|
||||
return _stub;
|
||||
} catch (AxisFault var3) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public void setSmsService1PortEndpointAddress(String address) {
|
||||
this.SmsService1Port_address = address;
|
||||
}
|
||||
|
||||
public Remote getPort(Class serviceEndpointInterface) throws ServiceException {
|
||||
try {
|
||||
if (SmsService1_PortType.class.isAssignableFrom(serviceEndpointInterface)) {
|
||||
SmsService1PortBindingStub _stub = new SmsService1PortBindingStub(new URL(this.SmsService1Port_address), this);
|
||||
_stub.setPortName(this.getSmsService1PortWSDDServiceName());
|
||||
return _stub;
|
||||
}
|
||||
} catch (Throwable var3) {
|
||||
throw new ServiceException(var3);
|
||||
}
|
||||
|
||||
throw new ServiceException("There is no stub implementation for the interface: " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
|
||||
}
|
||||
|
||||
public Remote getPort(QName portName, Class serviceEndpointInterface) throws ServiceException {
|
||||
if (portName == null) {
|
||||
return this.getPort(serviceEndpointInterface);
|
||||
} else {
|
||||
String inputPortName = portName.getLocalPart();
|
||||
if ("SmsService1Port".equals(inputPortName)) {
|
||||
return this.getSmsService1Port();
|
||||
} else {
|
||||
Remote _stub = this.getPort(serviceEndpointInterface);
|
||||
((Stub)_stub).setPortName(portName);
|
||||
return _stub;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public QName getServiceName() {
|
||||
return new QName("http://api.ws.ucp.sudytech.com/", "SmsService1");
|
||||
}
|
||||
|
||||
public Iterator getPorts() {
|
||||
if (this.ports == null) {
|
||||
this.ports = new HashSet();
|
||||
this.ports.add(new QName("http://api.ws.ucp.sudytech.com/", "SmsService1Port"));
|
||||
}
|
||||
|
||||
return this.ports.iterator();
|
||||
}
|
||||
|
||||
public void setEndpointAddress(String portName, String address) throws ServiceException {
|
||||
if ("SmsService1Port".equals(portName)) {
|
||||
this.setSmsService1PortEndpointAddress(address);
|
||||
} else {
|
||||
throw new ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
|
||||
}
|
||||
}
|
||||
|
||||
public void setEndpointAddress(QName portName, String address) throws ServiceException {
|
||||
this.setEndpointAddress(portName.getLocalPart(), address);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.ws.om;
|
||||
|
||||
import org.apache.axis.description.ElementDesc;
|
||||
import org.apache.axis.description.TypeDesc;
|
||||
import org.apache.axis.encoding.Deserializer;
|
||||
import org.apache.axis.encoding.Serializer;
|
||||
import org.apache.axis.encoding.ser.BeanDeserializer;
|
||||
import org.apache.axis.encoding.ser.BeanSerializer;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
import java.io.Serializable;
|
||||
import java.util.Calendar;
|
||||
|
||||
public class DeliverState implements Serializable {
|
||||
private String address;
|
||||
private String errorInfo;
|
||||
private Calendar sendTime;
|
||||
private int state;
|
||||
private Object __equalsCalc = null;
|
||||
private boolean __hashCodeCalc = false;
|
||||
private static TypeDesc typeDesc = new TypeDesc(DeliverState.class, true);
|
||||
|
||||
public DeliverState() {
|
||||
}
|
||||
|
||||
public DeliverState(String address, String errorInfo, Calendar sendTime, int state) {
|
||||
this.address = address;
|
||||
this.errorInfo = errorInfo;
|
||||
this.sendTime = sendTime;
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return this.address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getErrorInfo() {
|
||||
return this.errorInfo;
|
||||
}
|
||||
|
||||
public void setErrorInfo(String errorInfo) {
|
||||
this.errorInfo = errorInfo;
|
||||
}
|
||||
|
||||
public Calendar getSendTime() {
|
||||
return this.sendTime;
|
||||
}
|
||||
|
||||
public void setSendTime(Calendar sendTime) {
|
||||
this.sendTime = sendTime;
|
||||
}
|
||||
|
||||
public int getState() {
|
||||
return this.state;
|
||||
}
|
||||
|
||||
public void setState(int state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public synchronized boolean equals(Object obj) {
|
||||
if (!(obj instanceof DeliverState)) {
|
||||
return false;
|
||||
} else {
|
||||
DeliverState other = (DeliverState)obj;
|
||||
if (obj == null) {
|
||||
return false;
|
||||
} else if (this == obj) {
|
||||
return true;
|
||||
} else if (this.__equalsCalc != null) {
|
||||
return this.__equalsCalc == obj;
|
||||
} else {
|
||||
this.__equalsCalc = obj;
|
||||
boolean _equals = (this.address == null && other.getAddress() == null || this.address != null && this.address.equals(other.getAddress())) && (this.errorInfo == null && other.getErrorInfo() == null || this.errorInfo != null && this.errorInfo.equals(other.getErrorInfo())) && (this.sendTime == null && other.getSendTime() == null || this.sendTime != null && this.sendTime.equals(other.getSendTime())) && this.state == other.getState();
|
||||
this.__equalsCalc = null;
|
||||
return _equals;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized int hashCode() {
|
||||
if (this.__hashCodeCalc) {
|
||||
return 0;
|
||||
} else {
|
||||
this.__hashCodeCalc = true;
|
||||
int _hashCode = 1;
|
||||
if (this.getAddress() != null) {
|
||||
_hashCode += this.getAddress().hashCode();
|
||||
}
|
||||
|
||||
if (this.getErrorInfo() != null) {
|
||||
_hashCode += this.getErrorInfo().hashCode();
|
||||
}
|
||||
|
||||
if (this.getSendTime() != null) {
|
||||
_hashCode += this.getSendTime().hashCode();
|
||||
}
|
||||
|
||||
_hashCode += this.getState();
|
||||
this.__hashCodeCalc = false;
|
||||
return _hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
public static TypeDesc getTypeDesc() {
|
||||
return typeDesc;
|
||||
}
|
||||
|
||||
public static Serializer getSerializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanSerializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
public static Deserializer getDeserializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanDeserializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
static {
|
||||
typeDesc.setXmlType(new QName("http://api.ws.ucp.sudytech.com/", "deliverState"));
|
||||
ElementDesc elemField = new ElementDesc();
|
||||
elemField.setFieldName("address");
|
||||
elemField.setXmlName(new QName("", "address"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("errorInfo");
|
||||
elemField.setXmlName(new QName("", "errorInfo"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("sendTime");
|
||||
elemField.setXmlName(new QName("", "sendTime"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "dateTime"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("state");
|
||||
elemField.setXmlName(new QName("", "state"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "int"));
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.ws.om;
|
||||
|
||||
import org.apache.axis.AxisFault;
|
||||
import org.apache.axis.description.ElementDesc;
|
||||
import org.apache.axis.description.TypeDesc;
|
||||
import org.apache.axis.encoding.Deserializer;
|
||||
import org.apache.axis.encoding.SerializationContext;
|
||||
import org.apache.axis.encoding.Serializer;
|
||||
import org.apache.axis.encoding.ser.BeanDeserializer;
|
||||
import org.apache.axis.encoding.ser.BeanSerializer;
|
||||
import org.xml.sax.Attributes;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
import java.io.IOException;
|
||||
import java.io.Serializable;
|
||||
|
||||
public class MessageException extends AxisFault implements Serializable {
|
||||
private String message1;
|
||||
private Object __equalsCalc = null;
|
||||
private boolean __hashCodeCalc = false;
|
||||
private static TypeDesc typeDesc = new TypeDesc(MessageException.class, true);
|
||||
|
||||
public MessageException() {
|
||||
}
|
||||
|
||||
public MessageException(String message1) {
|
||||
this.message1 = message1;
|
||||
}
|
||||
|
||||
public String getMessage1() {
|
||||
return this.message1;
|
||||
}
|
||||
|
||||
public void setMessage1(String message1) {
|
||||
this.message1 = message1;
|
||||
}
|
||||
|
||||
public synchronized boolean equals(Object obj) {
|
||||
if (!(obj instanceof MessageException)) {
|
||||
return false;
|
||||
} else {
|
||||
MessageException other = (MessageException)obj;
|
||||
if (obj == null) {
|
||||
return false;
|
||||
} else if (this == obj) {
|
||||
return true;
|
||||
} else if (this.__equalsCalc != null) {
|
||||
return this.__equalsCalc == obj;
|
||||
} else {
|
||||
this.__equalsCalc = obj;
|
||||
boolean _equals = this.message1 == null && other.getMessage1() == null || this.message1 != null && this.message1.equals(other.getMessage1());
|
||||
this.__equalsCalc = null;
|
||||
return _equals;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized int hashCode() {
|
||||
if (this.__hashCodeCalc) {
|
||||
return 0;
|
||||
} else {
|
||||
this.__hashCodeCalc = true;
|
||||
int _hashCode = 1;
|
||||
if (this.getMessage1() != null) {
|
||||
_hashCode += this.getMessage1().hashCode();
|
||||
}
|
||||
|
||||
this.__hashCodeCalc = false;
|
||||
return _hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
public static TypeDesc getTypeDesc() {
|
||||
return typeDesc;
|
||||
}
|
||||
|
||||
public static Serializer getSerializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanSerializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
public static Deserializer getDeserializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanDeserializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
public void writeDetails(QName qname, SerializationContext context) throws IOException {
|
||||
context.serialize(qname, (Attributes)null, this);
|
||||
}
|
||||
|
||||
static {
|
||||
typeDesc.setXmlType(new QName("http://api.ws.ucp.sudytech.com/", "MessageException"));
|
||||
ElementDesc elemField = new ElementDesc();
|
||||
elemField.setFieldName("message1");
|
||||
elemField.setXmlName(new QName("", "message"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,214 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.ws.om;
|
||||
|
||||
import org.apache.axis.description.ElementDesc;
|
||||
import org.apache.axis.description.TypeDesc;
|
||||
import org.apache.axis.encoding.Deserializer;
|
||||
import org.apache.axis.encoding.Serializer;
|
||||
import org.apache.axis.encoding.ser.BeanDeserializer;
|
||||
import org.apache.axis.encoding.ser.BeanSerializer;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
import java.io.Serializable;
|
||||
import java.util.Calendar;
|
||||
|
||||
public class MessageState implements Serializable {
|
||||
private String address;
|
||||
private String errorInfo;
|
||||
private MessageStateProperties properties;
|
||||
private String replyContent;
|
||||
private int replyCount;
|
||||
private Calendar sendTime;
|
||||
private int state;
|
||||
private Object __equalsCalc = null;
|
||||
private boolean __hashCodeCalc = false;
|
||||
private static TypeDesc typeDesc = new TypeDesc(MessageState.class, true);
|
||||
|
||||
public MessageState() {
|
||||
}
|
||||
|
||||
public MessageState(String address, String errorInfo, MessageStateProperties properties, String replyContent, int replyCount, Calendar sendTime, int state) {
|
||||
this.address = address;
|
||||
this.errorInfo = errorInfo;
|
||||
this.properties = properties;
|
||||
this.replyContent = replyContent;
|
||||
this.replyCount = replyCount;
|
||||
this.sendTime = sendTime;
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return this.address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getErrorInfo() {
|
||||
return this.errorInfo;
|
||||
}
|
||||
|
||||
public void setErrorInfo(String errorInfo) {
|
||||
this.errorInfo = errorInfo;
|
||||
}
|
||||
|
||||
public MessageStateProperties getProperties() {
|
||||
return this.properties;
|
||||
}
|
||||
|
||||
public void setProperties(MessageStateProperties properties) {
|
||||
this.properties = properties;
|
||||
}
|
||||
|
||||
public String getReplyContent() {
|
||||
return this.replyContent;
|
||||
}
|
||||
|
||||
public void setReplyContent(String replyContent) {
|
||||
this.replyContent = replyContent;
|
||||
}
|
||||
|
||||
public int getReplyCount() {
|
||||
return this.replyCount;
|
||||
}
|
||||
|
||||
public void setReplyCount(int replyCount) {
|
||||
this.replyCount = replyCount;
|
||||
}
|
||||
|
||||
public Calendar getSendTime() {
|
||||
return this.sendTime;
|
||||
}
|
||||
|
||||
public void setSendTime(Calendar sendTime) {
|
||||
this.sendTime = sendTime;
|
||||
}
|
||||
|
||||
public int getState() {
|
||||
return this.state;
|
||||
}
|
||||
|
||||
public void setState(int state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public synchronized boolean equals(Object obj) {
|
||||
if (!(obj instanceof MessageState)) {
|
||||
return false;
|
||||
} else {
|
||||
MessageState other = (MessageState)obj;
|
||||
if (obj == null) {
|
||||
return false;
|
||||
} else if (this == obj) {
|
||||
return true;
|
||||
} else if (this.__equalsCalc != null) {
|
||||
return this.__equalsCalc == obj;
|
||||
} else {
|
||||
this.__equalsCalc = obj;
|
||||
boolean _equals = (this.address == null && other.getAddress() == null || this.address != null && this.address.equals(other.getAddress())) && (this.errorInfo == null && other.getErrorInfo() == null || this.errorInfo != null && this.errorInfo.equals(other.getErrorInfo())) && (this.properties == null && other.getProperties() == null || this.properties != null && this.properties.equals(other.getProperties())) && (this.replyContent == null && other.getReplyContent() == null || this.replyContent != null && this.replyContent.equals(other.getReplyContent())) && this.replyCount == other.getReplyCount() && (this.sendTime == null && other.getSendTime() == null || this.sendTime != null && this.sendTime.equals(other.getSendTime())) && this.state == other.getState();
|
||||
this.__equalsCalc = null;
|
||||
return _equals;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized int hashCode() {
|
||||
if (this.__hashCodeCalc) {
|
||||
return 0;
|
||||
} else {
|
||||
this.__hashCodeCalc = true;
|
||||
int _hashCode = 1;
|
||||
if (this.getAddress() != null) {
|
||||
_hashCode += this.getAddress().hashCode();
|
||||
}
|
||||
|
||||
if (this.getErrorInfo() != null) {
|
||||
_hashCode += this.getErrorInfo().hashCode();
|
||||
}
|
||||
|
||||
if (this.getProperties() != null) {
|
||||
_hashCode += this.getProperties().hashCode();
|
||||
}
|
||||
|
||||
if (this.getReplyContent() != null) {
|
||||
_hashCode += this.getReplyContent().hashCode();
|
||||
}
|
||||
|
||||
_hashCode += this.getReplyCount();
|
||||
if (this.getSendTime() != null) {
|
||||
_hashCode += this.getSendTime().hashCode();
|
||||
}
|
||||
|
||||
_hashCode += this.getState();
|
||||
this.__hashCodeCalc = false;
|
||||
return _hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
public static TypeDesc getTypeDesc() {
|
||||
return typeDesc;
|
||||
}
|
||||
|
||||
public static Serializer getSerializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanSerializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
public static Deserializer getDeserializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanDeserializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
static {
|
||||
typeDesc.setXmlType(new QName("http://api.ws.ucp.sudytech.com/", "messageState"));
|
||||
ElementDesc elemField = new ElementDesc();
|
||||
elemField.setFieldName("address");
|
||||
elemField.setXmlName(new QName("", "address"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("errorInfo");
|
||||
elemField.setXmlName(new QName("", "errorInfo"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("properties");
|
||||
elemField.setXmlName(new QName("", "properties"));
|
||||
elemField.setXmlType(new QName("http://api.ws.ucp.sudytech.com/", ">messageState>properties"));
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("replyContent");
|
||||
elemField.setXmlName(new QName("", "replyContent"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("replyCount");
|
||||
elemField.setXmlName(new QName("", "replyCount"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "int"));
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("sendTime");
|
||||
elemField.setXmlName(new QName("", "sendTime"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "dateTime"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("state");
|
||||
elemField.setXmlName(new QName("", "state"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "int"));
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
}
|
||||
}
|
||||
+112
@@ -0,0 +1,112 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.ws.om;
|
||||
|
||||
import org.apache.axis.description.ElementDesc;
|
||||
import org.apache.axis.description.TypeDesc;
|
||||
import org.apache.axis.encoding.Deserializer;
|
||||
import org.apache.axis.encoding.Serializer;
|
||||
import org.apache.axis.encoding.ser.BeanDeserializer;
|
||||
import org.apache.axis.encoding.ser.BeanSerializer;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
import java.io.Serializable;
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class MessageStateProperties implements Serializable {
|
||||
private MessageStatePropertiesEntry[] entry;
|
||||
private Object __equalsCalc = null;
|
||||
private boolean __hashCodeCalc = false;
|
||||
private static TypeDesc typeDesc = new TypeDesc(MessageStateProperties.class, true);
|
||||
|
||||
public MessageStateProperties() {
|
||||
}
|
||||
|
||||
public MessageStateProperties(MessageStatePropertiesEntry[] entry) {
|
||||
this.entry = entry;
|
||||
}
|
||||
|
||||
public MessageStatePropertiesEntry[] getEntry() {
|
||||
return this.entry;
|
||||
}
|
||||
|
||||
public void setEntry(MessageStatePropertiesEntry[] entry) {
|
||||
this.entry = entry;
|
||||
}
|
||||
|
||||
public MessageStatePropertiesEntry getEntry(int i) {
|
||||
return this.entry[i];
|
||||
}
|
||||
|
||||
public void setEntry(int i, MessageStatePropertiesEntry _value) {
|
||||
this.entry[i] = _value;
|
||||
}
|
||||
|
||||
public synchronized boolean equals(Object obj) {
|
||||
if (!(obj instanceof MessageStateProperties)) {
|
||||
return false;
|
||||
} else {
|
||||
MessageStateProperties other = (MessageStateProperties)obj;
|
||||
if (obj == null) {
|
||||
return false;
|
||||
} else if (this == obj) {
|
||||
return true;
|
||||
} else if (this.__equalsCalc != null) {
|
||||
return this.__equalsCalc == obj;
|
||||
} else {
|
||||
this.__equalsCalc = obj;
|
||||
boolean _equals = this.entry == null && other.getEntry() == null || this.entry != null && Arrays.equals(this.entry, other.getEntry());
|
||||
this.__equalsCalc = null;
|
||||
return _equals;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized int hashCode() {
|
||||
if (this.__hashCodeCalc) {
|
||||
return 0;
|
||||
} else {
|
||||
this.__hashCodeCalc = true;
|
||||
int _hashCode = 1;
|
||||
if (this.getEntry() != null) {
|
||||
for(int i = 0; i < Array.getLength(this.getEntry()); ++i) {
|
||||
Object obj = Array.get(this.getEntry(), i);
|
||||
if (obj != null && !obj.getClass().isArray()) {
|
||||
_hashCode += obj.hashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.__hashCodeCalc = false;
|
||||
return _hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
public static TypeDesc getTypeDesc() {
|
||||
return typeDesc;
|
||||
}
|
||||
|
||||
public static Serializer getSerializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanSerializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
public static Deserializer getDeserializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanDeserializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
static {
|
||||
typeDesc.setXmlType(new QName("http://api.ws.ucp.sudytech.com/", ">messageState>properties"));
|
||||
ElementDesc elemField = new ElementDesc();
|
||||
elemField.setFieldName("entry");
|
||||
elemField.setXmlName(new QName("", "entry"));
|
||||
elemField.setXmlType(new QName("http://api.ws.ucp.sudytech.com/", ">>messageState>properties>entry"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
elemField.setMaxOccursUnbounded(true);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
}
|
||||
}
|
||||
+117
@@ -0,0 +1,117 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.ws.om;
|
||||
|
||||
import org.apache.axis.description.ElementDesc;
|
||||
import org.apache.axis.description.TypeDesc;
|
||||
import org.apache.axis.encoding.Deserializer;
|
||||
import org.apache.axis.encoding.Serializer;
|
||||
import org.apache.axis.encoding.ser.BeanDeserializer;
|
||||
import org.apache.axis.encoding.ser.BeanSerializer;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
import java.io.Serializable;
|
||||
|
||||
public class MessageStatePropertiesEntry implements Serializable {
|
||||
private String key;
|
||||
private String value;
|
||||
private Object __equalsCalc = null;
|
||||
private boolean __hashCodeCalc = false;
|
||||
private static TypeDesc typeDesc = new TypeDesc(MessageStatePropertiesEntry.class, true);
|
||||
|
||||
public MessageStatePropertiesEntry() {
|
||||
}
|
||||
|
||||
public MessageStatePropertiesEntry(String key, String value) {
|
||||
this.key = key;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getKey() {
|
||||
return this.key;
|
||||
}
|
||||
|
||||
public void setKey(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public synchronized boolean equals(Object obj) {
|
||||
if (!(obj instanceof MessageStatePropertiesEntry)) {
|
||||
return false;
|
||||
} else {
|
||||
MessageStatePropertiesEntry other = (MessageStatePropertiesEntry)obj;
|
||||
if (obj == null) {
|
||||
return false;
|
||||
} else if (this == obj) {
|
||||
return true;
|
||||
} else if (this.__equalsCalc != null) {
|
||||
return this.__equalsCalc == obj;
|
||||
} else {
|
||||
this.__equalsCalc = obj;
|
||||
boolean _equals = (this.key == null && other.getKey() == null || this.key != null && this.key.equals(other.getKey())) && (this.value == null && other.getValue() == null || this.value != null && this.value.equals(other.getValue()));
|
||||
this.__equalsCalc = null;
|
||||
return _equals;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized int hashCode() {
|
||||
if (this.__hashCodeCalc) {
|
||||
return 0;
|
||||
} else {
|
||||
this.__hashCodeCalc = true;
|
||||
int _hashCode = 1;
|
||||
if (this.getKey() != null) {
|
||||
_hashCode += this.getKey().hashCode();
|
||||
}
|
||||
|
||||
if (this.getValue() != null) {
|
||||
_hashCode += this.getValue().hashCode();
|
||||
}
|
||||
|
||||
this.__hashCodeCalc = false;
|
||||
return _hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
public static TypeDesc getTypeDesc() {
|
||||
return typeDesc;
|
||||
}
|
||||
|
||||
public static Serializer getSerializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanSerializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
public static Deserializer getDeserializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanDeserializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
static {
|
||||
typeDesc.setXmlType(new QName("http://api.ws.ucp.sudytech.com/", ">>messageState>properties>entry"));
|
||||
ElementDesc elemField = new ElementDesc();
|
||||
elemField.setFieldName("key");
|
||||
elemField.setXmlName(new QName("", "key"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("value");
|
||||
elemField.setXmlName(new QName("", "value"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,150 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.ws.om;
|
||||
|
||||
import org.apache.axis.description.ElementDesc;
|
||||
import org.apache.axis.description.TypeDesc;
|
||||
import org.apache.axis.encoding.Deserializer;
|
||||
import org.apache.axis.encoding.Serializer;
|
||||
import org.apache.axis.encoding.ser.BeanDeserializer;
|
||||
import org.apache.axis.encoding.ser.BeanSerializer;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
import java.io.Serializable;
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class SendResult implements Serializable {
|
||||
private String messageId;
|
||||
private boolean success;
|
||||
private WrongAddress[] wrongAddresses;
|
||||
private Object __equalsCalc = null;
|
||||
private boolean __hashCodeCalc = false;
|
||||
private static TypeDesc typeDesc = new TypeDesc(SendResult.class, true);
|
||||
|
||||
public SendResult() {
|
||||
}
|
||||
|
||||
public SendResult(String messageId, boolean success, WrongAddress[] wrongAddresses) {
|
||||
this.messageId = messageId;
|
||||
this.success = success;
|
||||
this.wrongAddresses = wrongAddresses;
|
||||
}
|
||||
|
||||
public String getMessageId() {
|
||||
return this.messageId;
|
||||
}
|
||||
|
||||
public void setMessageId(String messageId) {
|
||||
this.messageId = messageId;
|
||||
}
|
||||
|
||||
public boolean isSuccess() {
|
||||
return this.success;
|
||||
}
|
||||
|
||||
public void setSuccess(boolean success) {
|
||||
this.success = success;
|
||||
}
|
||||
|
||||
public WrongAddress[] getWrongAddresses() {
|
||||
return this.wrongAddresses;
|
||||
}
|
||||
|
||||
public void setWrongAddresses(WrongAddress[] wrongAddresses) {
|
||||
this.wrongAddresses = wrongAddresses;
|
||||
}
|
||||
|
||||
public WrongAddress getWrongAddresses(int i) {
|
||||
return this.wrongAddresses[i];
|
||||
}
|
||||
|
||||
public void setWrongAddresses(int i, WrongAddress _value) {
|
||||
this.wrongAddresses[i] = _value;
|
||||
}
|
||||
|
||||
public synchronized boolean equals(Object obj) {
|
||||
if (!(obj instanceof SendResult)) {
|
||||
return false;
|
||||
} else {
|
||||
SendResult other = (SendResult)obj;
|
||||
if (obj == null) {
|
||||
return false;
|
||||
} else if (this == obj) {
|
||||
return true;
|
||||
} else if (this.__equalsCalc != null) {
|
||||
return this.__equalsCalc == obj;
|
||||
} else {
|
||||
this.__equalsCalc = obj;
|
||||
boolean _equals = (this.messageId == null && other.getMessageId() == null || this.messageId != null && this.messageId.equals(other.getMessageId())) && this.success == other.isSuccess() && (this.wrongAddresses == null && other.getWrongAddresses() == null || this.wrongAddresses != null && Arrays.equals(this.wrongAddresses, other.getWrongAddresses()));
|
||||
this.__equalsCalc = null;
|
||||
return _equals;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized int hashCode() {
|
||||
if (this.__hashCodeCalc) {
|
||||
return 0;
|
||||
} else {
|
||||
this.__hashCodeCalc = true;
|
||||
int _hashCode = 1;
|
||||
if (this.getMessageId() != null) {
|
||||
_hashCode += this.getMessageId().hashCode();
|
||||
}
|
||||
|
||||
_hashCode += (this.isSuccess() ? Boolean.TRUE : Boolean.FALSE).hashCode();
|
||||
if (this.getWrongAddresses() != null) {
|
||||
for(int i = 0; i < Array.getLength(this.getWrongAddresses()); ++i) {
|
||||
Object obj = Array.get(this.getWrongAddresses(), i);
|
||||
if (obj != null && !obj.getClass().isArray()) {
|
||||
_hashCode += obj.hashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.__hashCodeCalc = false;
|
||||
return _hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
public static TypeDesc getTypeDesc() {
|
||||
return typeDesc;
|
||||
}
|
||||
|
||||
public static Serializer getSerializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanSerializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
public static Deserializer getDeserializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanDeserializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
static {
|
||||
typeDesc.setXmlType(new QName("http://api.ws.ucp.sudytech.com/", "sendResult"));
|
||||
ElementDesc elemField = new ElementDesc();
|
||||
elemField.setFieldName("messageId");
|
||||
elemField.setXmlName(new QName("", "messageId"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("success");
|
||||
elemField.setXmlName(new QName("", "success"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "boolean"));
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("wrongAddresses");
|
||||
elemField.setXmlName(new QName("", "wrongAddresses"));
|
||||
elemField.setXmlType(new QName("http://api.ws.ucp.sudytech.com/", "wrongAddress"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(true);
|
||||
elemField.setMaxOccursUnbounded(true);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.ws.om;
|
||||
|
||||
import org.apache.axis.description.ElementDesc;
|
||||
import org.apache.axis.description.TypeDesc;
|
||||
import org.apache.axis.encoding.Deserializer;
|
||||
import org.apache.axis.encoding.Serializer;
|
||||
import org.apache.axis.encoding.ser.BeanDeserializer;
|
||||
import org.apache.axis.encoding.ser.BeanSerializer;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
import java.io.Serializable;
|
||||
|
||||
public class WrongAddress implements Serializable {
|
||||
private String address;
|
||||
private String errorInfo;
|
||||
private Object __equalsCalc = null;
|
||||
private boolean __hashCodeCalc = false;
|
||||
private static TypeDesc typeDesc = new TypeDesc(WrongAddress.class, true);
|
||||
|
||||
public WrongAddress() {
|
||||
}
|
||||
|
||||
public WrongAddress(String address, String errorInfo) {
|
||||
this.address = address;
|
||||
this.errorInfo = errorInfo;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return this.address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getErrorInfo() {
|
||||
return this.errorInfo;
|
||||
}
|
||||
|
||||
public void setErrorInfo(String errorInfo) {
|
||||
this.errorInfo = errorInfo;
|
||||
}
|
||||
|
||||
public synchronized boolean equals(Object obj) {
|
||||
if (!(obj instanceof WrongAddress)) {
|
||||
return false;
|
||||
} else {
|
||||
WrongAddress other = (WrongAddress)obj;
|
||||
if (obj == null) {
|
||||
return false;
|
||||
} else if (this == obj) {
|
||||
return true;
|
||||
} else if (this.__equalsCalc != null) {
|
||||
return this.__equalsCalc == obj;
|
||||
} else {
|
||||
this.__equalsCalc = obj;
|
||||
boolean _equals = (this.address == null && other.getAddress() == null || this.address != null && this.address.equals(other.getAddress())) && (this.errorInfo == null && other.getErrorInfo() == null || this.errorInfo != null && this.errorInfo.equals(other.getErrorInfo()));
|
||||
this.__equalsCalc = null;
|
||||
return _equals;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized int hashCode() {
|
||||
if (this.__hashCodeCalc) {
|
||||
return 0;
|
||||
} else {
|
||||
this.__hashCodeCalc = true;
|
||||
int _hashCode = 1;
|
||||
if (this.getAddress() != null) {
|
||||
_hashCode += this.getAddress().hashCode();
|
||||
}
|
||||
|
||||
if (this.getErrorInfo() != null) {
|
||||
_hashCode += this.getErrorInfo().hashCode();
|
||||
}
|
||||
|
||||
this.__hashCodeCalc = false;
|
||||
return _hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
public static TypeDesc getTypeDesc() {
|
||||
return typeDesc;
|
||||
}
|
||||
|
||||
public static Serializer getSerializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanSerializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
public static Deserializer getDeserializer(String mechType, Class _javaType, QName _xmlType) {
|
||||
return new BeanDeserializer(_javaType, _xmlType, typeDesc);
|
||||
}
|
||||
|
||||
static {
|
||||
typeDesc.setXmlType(new QName("http://api.ws.ucp.sudytech.com/", "wrongAddress"));
|
||||
ElementDesc elemField = new ElementDesc();
|
||||
elemField.setFieldName("address");
|
||||
elemField.setXmlName(new QName("", "address"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
elemField = new ElementDesc();
|
||||
elemField.setFieldName("errorInfo");
|
||||
elemField.setXmlName(new QName("", "errorInfo"));
|
||||
elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||
elemField.setMinOccurs(0);
|
||||
elemField.setNillable(false);
|
||||
typeDesc.addFieldDesc(elemField);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.ws.util;
|
||||
|
||||
import cn.hutool.json.JSONArray;
|
||||
import com.budwk.app.base.sms.impl.njupt.ucp.serv.client.Address;
|
||||
import com.budwk.app.base.sms.impl.njupt.ucp.serv.client.Message;
|
||||
import com.budwk.app.base.sms.impl.njupt.ucp.serv.client.MessageProperties;
|
||||
import com.budwk.app.base.sms.impl.njupt.ucp.serv.client.MessagePropertiesEntry;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.FileReader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MessageBuilder {
|
||||
private String _subject = "待办消息";
|
||||
private String _content = "消息测试,您的oa有一条待办提醒,需要处理!";
|
||||
private String _indivSubject = "待办提醒";
|
||||
private String _indivContent = "${message}${name}";
|
||||
private String _smsSignature = "东南大学";
|
||||
|
||||
public MessageBuilder() {
|
||||
}
|
||||
|
||||
public MessageBuilder(String smsSignature) {
|
||||
this._smsSignature = smsSignature;
|
||||
}
|
||||
|
||||
public MessageBuilder(String subject, String content) {
|
||||
this._subject = subject;
|
||||
this._content = content;
|
||||
this._indivSubject = subject;
|
||||
this._indivContent = content;
|
||||
}
|
||||
|
||||
public Message buildMessage(Address[] address, boolean isLinkUrl) throws Exception {
|
||||
Message message = new Message();
|
||||
message.setTo(address);
|
||||
message.setSubject(this._subject);
|
||||
message.setContent(this._content);
|
||||
message.setMsgType(isLinkUrl ? 1 : 0);
|
||||
MessagePropertiesEntry signature = this.buildProperty("smsSignature", this._smsSignature);
|
||||
MessagePropertiesEntry imLinkUrl = this.buildProperty("im_linkUrl", "http://www.baidu.com");
|
||||
MessagePropertiesEntry[] entrys = isLinkUrl ? new MessagePropertiesEntry[]{signature, imLinkUrl} : new MessagePropertiesEntry[]{signature};
|
||||
message.setProperties(new MessageProperties(entrys));
|
||||
return message;
|
||||
}
|
||||
|
||||
public Message buildIndivMessage(boolean isLinkUrl) throws Exception {
|
||||
Message message = new Message();
|
||||
message.setSubject(this._indivSubject);
|
||||
message.setContent(this._indivContent);
|
||||
message.setMsgType(isLinkUrl ? 1 : 0);
|
||||
MessagePropertiesEntry signature = this.buildProperty("smsSignature", "东华大学");
|
||||
MessagePropertiesEntry imLinkUrl = this.buildProperty("im_linkUrl", "http://www.baidu.com");
|
||||
MessagePropertiesEntry[] entrys = isLinkUrl ? new MessagePropertiesEntry[]{signature, imLinkUrl} : new MessagePropertiesEntry[]{signature};
|
||||
message.setProperties(new MessageProperties(entrys));
|
||||
return message;
|
||||
}
|
||||
|
||||
public Address[] loadAddesses(String filePath, int count) throws Exception {
|
||||
List<Address> addressList = new ArrayList();
|
||||
FileReader fr = new FileReader(filePath);
|
||||
BufferedReader br = new BufferedReader(fr);
|
||||
int begin = 0;
|
||||
|
||||
String line;
|
||||
while((line = br.readLine()) != null && begin < count) {
|
||||
if (line != null && line.length() != 0) {
|
||||
++begin;
|
||||
addressList.add(new Address("(" + line + ")", "uc_ux"));
|
||||
}
|
||||
}
|
||||
|
||||
br.close();
|
||||
fr.close();
|
||||
return (Address[])addressList.toArray(new Address[addressList.size()]);
|
||||
}
|
||||
|
||||
public String loadIndivAddesses(String filePath, int count) throws Exception {
|
||||
JSONArray data = new JSONArray();
|
||||
JSONArray jsonHead = new JSONArray();
|
||||
jsonHead.add("type");
|
||||
jsonHead.add("address");
|
||||
jsonHead.add("message");
|
||||
jsonHead.add("name");
|
||||
data.add(jsonHead);
|
||||
FileReader fr = new FileReader(filePath);
|
||||
BufferedReader br = new BufferedReader(fr);
|
||||
int begin = 0;
|
||||
|
||||
String line;
|
||||
while((line = br.readLine()) != null && begin < count) {
|
||||
if (line != null && line.length() != 0) {
|
||||
++begin;
|
||||
JSONArray jsonData = new JSONArray();
|
||||
jsonData.add("uc_ux");
|
||||
jsonData.add("(" + line + ")");
|
||||
jsonData.add("个性化消息测试,您的oa有一条待办提醒,需要处理!");
|
||||
jsonData.add(String.valueOf(begin));
|
||||
data.add(jsonData);
|
||||
}
|
||||
}
|
||||
|
||||
br.close();
|
||||
fr.close();
|
||||
return data.toString();
|
||||
}
|
||||
|
||||
public MessagePropertiesEntry buildProperty(String key, String value) {
|
||||
return new MessagePropertiesEntry(key, value);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package com.budwk.app.base.sms.impl.njupt.ucp.ws.util;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
|
||||
import java.security.MessageDigest;
|
||||
import java.util.*;
|
||||
|
||||
public class TokenBuilder {
|
||||
private String _appId;
|
||||
private String _privateKey;
|
||||
|
||||
public TokenBuilder(String appId, String privateKey) {
|
||||
this._appId = appId;
|
||||
this._privateKey = privateKey;
|
||||
}
|
||||
|
||||
public String buildToken() throws Exception {
|
||||
String timestamp = String.valueOf(System.currentTimeMillis());
|
||||
String nonce = String.valueOf((new Random()).nextInt(10000));
|
||||
JSONObject jsonObj = new JSONObject();
|
||||
jsonObj.put("authType", "sign1");
|
||||
jsonObj.put("appId", this._appId);
|
||||
jsonObj.put("timestamp", timestamp);
|
||||
jsonObj.put("nonce", nonce);
|
||||
jsonObj.put("signature", this.buildSignature(this._privateKey, timestamp, this._appId, nonce));
|
||||
return jsonObj.toString();
|
||||
}
|
||||
|
||||
private String buildSignature(String securyKey, String timestamp, String appId, String nonce) throws Exception {
|
||||
List<String> sParamList = new ArrayList();
|
||||
sParamList.add(securyKey);
|
||||
sParamList.add(timestamp);
|
||||
sParamList.add(nonce);
|
||||
sParamList.add(appId);
|
||||
Collections.sort(sParamList, new Comparator<String>() {
|
||||
public int compare(String o1, String o2) {
|
||||
return o1.compareTo(o2);
|
||||
}
|
||||
});
|
||||
StringBuilder signature = new StringBuilder();
|
||||
Iterator i$ = sParamList.iterator();
|
||||
|
||||
while(i$.hasNext()) {
|
||||
String sParam = (String)i$.next();
|
||||
signature.append(sParam);
|
||||
}
|
||||
|
||||
MessageDigest md = MessageDigest.getInstance("SHA-1");
|
||||
md.update(signature.toString().getBytes());
|
||||
return this.toHex(md.digest());
|
||||
}
|
||||
|
||||
private String toHex(byte[] buffer) {
|
||||
StringBuilder sb = new StringBuilder(buffer.length * 2);
|
||||
|
||||
for(int i = 0; i < buffer.length; ++i) {
|
||||
sb.append(Character.forDigit((buffer[i] & 240) >> 4, 16));
|
||||
sb.append(Character.forDigit(buffer[i] & 15, 16));
|
||||
}
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
package com.budwk.app.base.sqlCallback;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.ReflectUtil;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.mysql.cj.MysqlType;
|
||||
import org.apache.commons.lang3.reflect.TypeUtils;
|
||||
import org.nutz.dao.impl.jdbc.BlobValueAdaptor;
|
||||
import org.nutz.dao.jdbc.Jdbcs;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.sql.SqlCallback;
|
||||
import org.nutz.json.Json;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.ParameterizedType;
|
||||
import java.lang.reflect.Type;
|
||||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.ResultSetMetaData;
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
|
||||
public class FetchVoCallback implements SqlCallback {
|
||||
|
||||
protected Class<?> clazz;
|
||||
|
||||
public FetchVoCallback(Class<?> clazz) {
|
||||
this.clazz = clazz;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object invoke(Connection connection, ResultSet rs, Sql sql) throws SQLException {
|
||||
if (null != rs && rs.next()) {
|
||||
try {
|
||||
Object obj = clazz.getDeclaredConstructor().newInstance();
|
||||
String name = null;
|
||||
ResultSetMetaData meta = rs.getMetaData();
|
||||
int count = meta.getColumnCount();
|
||||
for (int i = 1; i <= count; ++i) {
|
||||
name = meta.getColumnLabel(i);
|
||||
int columnType = meta.getColumnType(i);
|
||||
String columnTypeName = meta.getColumnTypeName(i);
|
||||
|
||||
Field field = ReflectUtil.getField(clazz, name);
|
||||
|
||||
if(ObjectUtil.isNull(field)){
|
||||
continue;
|
||||
}
|
||||
|
||||
Object object = null;
|
||||
|
||||
if (columnType == 93 || columnType == 91) {
|
||||
object = rs.getTimestamp(i);
|
||||
} else if (columnType == 2004) {
|
||||
object = (new BlobValueAdaptor(Jdbcs.getFilePool())).get(rs, name);
|
||||
} else if (columnType == 2005) {
|
||||
object = rs.getString(i);
|
||||
} else if (columnType == -1) {
|
||||
if (columnTypeName.equals(MysqlType.JSON.getName())) {
|
||||
Class<?> type = field.getType();
|
||||
if (type.isAssignableFrom(List.class)) {
|
||||
System.out.println(rs.getString(i));
|
||||
//List的泛型怎么获取
|
||||
if (field.getGenericType() instanceof ParameterizedType) {
|
||||
ParameterizedType pt = (ParameterizedType) field.getGenericType();
|
||||
Type[] actualTypeArguments = pt.getActualTypeArguments();
|
||||
for (Type typeArg : actualTypeArguments) {
|
||||
System.out.println("List Field Generic Type: " + TypeUtils.toString(typeArg));
|
||||
/*if(typeArg.getTypeName().equals(String.class.getName())){
|
||||
if(ObjectUtil.isNotNull(rs.getString(i))){
|
||||
object = Json.fromJsonAsList(String.class, rs.getString(i));
|
||||
break;
|
||||
}
|
||||
} else if(typeArg.getTypeName().equals(JSONObject.class.getName())) {
|
||||
if(ObjectUtil.isNotNull(rs.getObject(i))){
|
||||
object = Json.fromJsonAsList(JSONObject.class, rs.getString(i));
|
||||
break;
|
||||
}
|
||||
}*/
|
||||
if(ObjectUtil.isNotNull(rs.getObject(i))){
|
||||
object = Json.fromJsonAsList(Class.forName(typeArg.getTypeName()), rs.getString(i));
|
||||
break;
|
||||
}
|
||||
//todo Map暂未实现
|
||||
}
|
||||
}else{
|
||||
object = rs.getString(i);
|
||||
}
|
||||
}else if(type.isArray()){
|
||||
object = Json.fromJsonAsArray(type, rs.getString(i));
|
||||
}else{
|
||||
object = Json.fromJson(type, rs.getString(i));
|
||||
}
|
||||
} else {
|
||||
object = rs.getObject(i);
|
||||
}
|
||||
} else {
|
||||
object = rs.getObject(i);
|
||||
}
|
||||
|
||||
//生成clazz类型的实例
|
||||
if(ObjectUtil.isNotNull(field)){
|
||||
ReflectUtil.setFieldValue(obj, field, object);
|
||||
}
|
||||
}
|
||||
|
||||
return obj;
|
||||
} catch (InstantiationException | IllegalAccessException | InvocationTargetException |
|
||||
NoSuchMethodException | ClassNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
package com.budwk.app.base.sqlCallback;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.ReflectUtil;
|
||||
import cn.hutool.core.util.TypeUtil;
|
||||
import com.mysql.cj.MysqlType;
|
||||
import org.nutz.dao.DaoException;
|
||||
import org.nutz.dao.impl.jdbc.BlobValueAdaptor;
|
||||
import org.nutz.dao.jdbc.Jdbcs;
|
||||
import org.nutz.dao.pager.ResultSetLooping;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.sql.SqlCallback;
|
||||
import org.nutz.dao.sql.SqlContext;
|
||||
import org.nutz.json.Json;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Type;
|
||||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.ResultSetMetaData;
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* VO 查询回调
|
||||
* 如果你的字段是json类型 那么也可以根据VO的类型来做映射
|
||||
* todo 暂时只支持List<String>
|
||||
* @author zhaoxinyu
|
||||
*/
|
||||
public class QueryVoCallback implements SqlCallback {
|
||||
|
||||
protected Class<?> clazz;
|
||||
|
||||
public QueryVoCallback(Class<?> clazz) {
|
||||
this.clazz = clazz;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object invoke(Connection connection, ResultSet rs, Sql sql) throws SQLException {
|
||||
final ResultSetMetaData meta = rs.getMetaData();
|
||||
|
||||
|
||||
ResultSetLooping ing = new ResultSetLooping() {
|
||||
protected boolean createObject(int index, ResultSet rs, SqlContext context, int rowCount) {
|
||||
try {
|
||||
Object obj = clazz.getDeclaredConstructor().newInstance();
|
||||
String name = null;
|
||||
int count = meta.getColumnCount();
|
||||
for (int i = 1; i <= count; ++i) {
|
||||
name = meta.getColumnLabel(i);
|
||||
int columnType = meta.getColumnType(i);
|
||||
String columnTypeName = meta.getColumnTypeName(i);
|
||||
|
||||
Field field = ReflectUtil.getField(clazz, name);
|
||||
|
||||
if(ObjectUtil.isNull(field)){
|
||||
continue;
|
||||
}
|
||||
|
||||
Object object = null;
|
||||
|
||||
if (columnType == 93 || columnType == 91) {
|
||||
object = rs.getTimestamp(i);
|
||||
} else if (columnType == 2004) {
|
||||
object = (new BlobValueAdaptor(Jdbcs.getFilePool())).get(rs, name);
|
||||
} else if (columnType == 2005) {
|
||||
object = rs.getString(i);
|
||||
} else if (columnType == -1) {
|
||||
if (columnTypeName.equals(MysqlType.JSON.getName())) {
|
||||
try{
|
||||
Class<?> type = field.getType();
|
||||
|
||||
if (type.isAssignableFrom(List.class)) {
|
||||
Type typeArgument = TypeUtil.getTypeArgument(field.getGenericType());
|
||||
if(ObjectUtil.isNotNull(rs.getString(i))){
|
||||
object = Json.fromJsonAsList(Class.forName(typeArgument.getTypeName()), rs.getString(i));
|
||||
}
|
||||
}else if(type.isArray()){
|
||||
if(ObjectUtil.isNotNull(rs.getString(i))){
|
||||
object = Json.fromJsonAsArray(type.getComponentType(), rs.getString(i));
|
||||
}
|
||||
}else{
|
||||
object = Json.fromJson(type, rs.getString(i));
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
object = rs.getObject(i);
|
||||
}
|
||||
} else {
|
||||
object = rs.getObject(i);
|
||||
}
|
||||
|
||||
//生成clazz类型的实例
|
||||
if(ObjectUtil.isNotNull(field)){
|
||||
ReflectUtil.setFieldValue(obj, field, object);
|
||||
}
|
||||
}
|
||||
list.add(obj);
|
||||
} catch (SQLException e) {
|
||||
throw new DaoException(e);
|
||||
} catch (Exception e){
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
ing.doLoop(rs, sql.getContext());
|
||||
return ing.getList();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
package com.budwk.app.base.utils;
|
||||
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.springframework.beans.factory.BeanDefinitionStoreException;
|
||||
import org.springframework.context.ResourceLoaderAware;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.core.io.ResourceLoader;
|
||||
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
|
||||
import org.springframework.core.io.support.ResourcePatternResolver;
|
||||
import org.springframework.core.io.support.ResourcePatternUtils;
|
||||
import org.springframework.core.type.classreading.CachingMetadataReaderFactory;
|
||||
import org.springframework.core.type.classreading.MetadataReader;
|
||||
import org.springframework.core.type.classreading.MetadataReaderFactory;
|
||||
import org.springframework.core.type.filter.AnnotationTypeFilter;
|
||||
import org.springframework.core.type.filter.TypeFilter;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.util.SystemPropertyUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
public class ClassScannerUtil implements ResourceLoaderAware {
|
||||
private final List<TypeFilter> includeFilters = new LinkedList<TypeFilter>();
|
||||
private final List<TypeFilter> excludeFilters = new LinkedList<TypeFilter>();
|
||||
|
||||
private ResourcePatternResolver resourcePatternResolver = new PathMatchingResourcePatternResolver();
|
||||
private MetadataReaderFactory metadataReaderFactory = new CachingMetadataReaderFactory(this.resourcePatternResolver);
|
||||
|
||||
public static Set<Class> scan(String[] basePackages,
|
||||
Class<? extends Annotation>... annotations) {
|
||||
ClassScannerUtil cs = new ClassScannerUtil();
|
||||
if (ArrayUtils.isNotEmpty(annotations)) {
|
||||
for (Class anno : annotations) {
|
||||
cs.addIncludeFilter(new AnnotationTypeFilter(anno));
|
||||
}
|
||||
}
|
||||
Set<Class> classes = new HashSet<Class>();
|
||||
for (String s : basePackages) {
|
||||
classes.addAll(cs.doScan(s));
|
||||
}
|
||||
return classes;
|
||||
}
|
||||
|
||||
public static Set<Class> scan(String basePackages, Class<? extends Annotation>... annotations) {
|
||||
return ClassScannerUtil.scan(StringUtils.tokenizeToStringArray(basePackages, ",; \t\n"), annotations);
|
||||
}
|
||||
|
||||
public final ResourceLoader getResourceLoader() {
|
||||
return this.resourcePatternResolver;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setResourceLoader(ResourceLoader resourceLoader) {
|
||||
this.resourcePatternResolver = ResourcePatternUtils
|
||||
.getResourcePatternResolver(resourceLoader);
|
||||
this.metadataReaderFactory = new CachingMetadataReaderFactory(
|
||||
resourceLoader);
|
||||
}
|
||||
|
||||
public void addIncludeFilter(TypeFilter includeFilter) {
|
||||
this.includeFilters.add(includeFilter);
|
||||
}
|
||||
|
||||
public void addExcludeFilter(TypeFilter excludeFilter) {
|
||||
this.excludeFilters.add(0, excludeFilter);
|
||||
}
|
||||
|
||||
public void resetFilters(boolean useDefaultFilters) {
|
||||
this.includeFilters.clear();
|
||||
this.excludeFilters.clear();
|
||||
}
|
||||
|
||||
public Set<Class> doScan(String basePackage) {
|
||||
Set<Class> classes = new HashSet<Class>();
|
||||
try {
|
||||
String packageSearchPath = ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX
|
||||
+ org.springframework.util.ClassUtils
|
||||
.convertClassNameToResourcePath(SystemPropertyUtils
|
||||
.resolvePlaceholders(basePackage))
|
||||
+ "/**/*.class";
|
||||
Resource[] resources = this.resourcePatternResolver
|
||||
.getResources(packageSearchPath);
|
||||
|
||||
for (Resource resource : resources) {
|
||||
if (resource.isReadable()) {
|
||||
MetadataReader metadataReader = this.metadataReaderFactory.getMetadataReader(resource);
|
||||
if ((includeFilters.size() == 0 && excludeFilters.size() == 0)
|
||||
|| matches(metadataReader)) {
|
||||
try {
|
||||
classes.add(Class.forName(metadataReader
|
||||
.getClassMetadata().getClassName()));
|
||||
} catch (ClassNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
throw new BeanDefinitionStoreException(
|
||||
"I/O failure during classpath scanning", ex);
|
||||
}
|
||||
return classes;
|
||||
}
|
||||
|
||||
protected boolean matches(MetadataReader metadataReader) throws IOException {
|
||||
for (TypeFilter tf : this.excludeFilters) {
|
||||
if (tf.match(metadataReader, this.metadataReaderFactory)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
for (TypeFilter tf : this.includeFilters) {
|
||||
if (tf.match(metadataReader, this.metadataReaderFactory)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* Copyright [2022] [https://www.xiaonuo.vip]
|
||||
*
|
||||
* Snowy采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
|
||||
*
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改Snowy源码头部的版权声明。
|
||||
* 3.本项目代码可免费商业使用,商业使用请保留源码和相关描述文件的项目出处,作者声明等。
|
||||
* 4.分发源码时候,请注明软件出处 https://www.xiaonuo.vip
|
||||
* 5.不可二次分发开源参与同类竞品,如有想法可联系团队xiaonuobase@qq.com商议合作。
|
||||
* 6.若您的项目无法满足以上几点,需要更多功能代码,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip
|
||||
*/
|
||||
package com.budwk.app.base.utils;
|
||||
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import cn.hutool.core.util.URLUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* 文件下载工具类,使用本类前,对参数校验的异常使用CommonResponseUtil.renderError()方法进行渲染
|
||||
*
|
||||
* @author xuyuxiang
|
||||
* @date 2020/8/5 21:45
|
||||
*/
|
||||
@Slf4j
|
||||
public class CommonDownloadUtil {
|
||||
|
||||
/**
|
||||
* 下载文件
|
||||
*
|
||||
* @param file 要下载的文件
|
||||
* @param response 响应
|
||||
* @author xuyuxiang
|
||||
* @date 2020/8/5 21:46
|
||||
*/
|
||||
public static void download(File file, HttpServletResponse response) {
|
||||
download(file.getName(), FileUtil.readBytes(file), response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载文件
|
||||
*
|
||||
* @param fileName
|
||||
* @param workbook
|
||||
* @param response
|
||||
*/
|
||||
public static void download(String fileName, Workbook workbook, HttpServletResponse response) {
|
||||
ByteArrayOutputStream byteOs = new ByteArrayOutputStream();
|
||||
try {
|
||||
workbook.write(byteOs);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
log.error(">>> 文件下载异常:", e);
|
||||
} finally {
|
||||
try {
|
||||
workbook.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
IoUtil.close(byteOs);
|
||||
}
|
||||
download(fileName, byteOs.toByteArray(), response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载文件
|
||||
*
|
||||
* @author xuyuxiang
|
||||
* @date 2022/7/31 10:57
|
||||
*/
|
||||
public static void download(String fileName, byte[] fileBytes, HttpServletResponse response) {
|
||||
try {
|
||||
response.setHeader("Content-Disposition", "attachment;filename=" + URLUtil.encode(fileName));
|
||||
response.addHeader("Content-Length", "" + fileBytes.length);
|
||||
response.setHeader("Access-Control-Allow-Origin", "*");
|
||||
response.setHeader("Access-Control-Expose-Headers", "Content-Disposition");
|
||||
response.setContentType("application/octet-stream;charset=UTF-8");
|
||||
IoUtil.write(response.getOutputStream(), true, fileBytes);
|
||||
} catch (IOException e) {
|
||||
log.error(">>> 文件下载异常:", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
package com.budwk.app.base.utils;
|
||||
|
||||
import org.apache.commons.lang3.time.DateFormatUtils;
|
||||
import org.nutz.lang.Times;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Created by wizzer on 2016/6/24.
|
||||
*/
|
||||
public class DateUtil {
|
||||
private static final Locale DEFAULT_LOCALE = Locale.CHINA;
|
||||
private static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
/**
|
||||
* 获取当前时间(HH:mm:ss)
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String getDate() {
|
||||
return DateFormatUtils.format(new Date(), "yyyy-MM-dd", DEFAULT_LOCALE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前时间(HH:mm:ss)
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String getTime() {
|
||||
return DateFormatUtils.format(new Date(), "HH:mm:ss", DEFAULT_LOCALE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前时间(yyyy-MM-dd HH:mm:ss)
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String getDateTime() {
|
||||
return DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm:ss", DEFAULT_LOCALE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换日期格式(yyyy-MM-dd HH:mm:ss)
|
||||
*
|
||||
* @param date
|
||||
* @return
|
||||
*/
|
||||
public static String formatDateTime(Date date) {
|
||||
if (date == null) return "";
|
||||
return DateFormatUtils.format(date, "yyyy-MM-dd HH:mm:ss", DEFAULT_LOCALE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换日期格式(yyyy-MM-dd HH:mm:ss)
|
||||
*
|
||||
* @param date
|
||||
* @param f
|
||||
* @return
|
||||
*/
|
||||
public static String format(Date date, String f) {
|
||||
if (date == null) return "";
|
||||
return DateFormatUtils.format(date, f, DEFAULT_LOCALE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 时间戳日期
|
||||
*
|
||||
* @param time
|
||||
* @return
|
||||
*/
|
||||
public static String getDate(long time) {
|
||||
return DateFormatUtils.format(new Date(time * 1000), "yyyy-MM-dd HH:mm:ss", DEFAULT_LOCALE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 时间戳日期
|
||||
*
|
||||
* @param time
|
||||
* @param f
|
||||
* @return
|
||||
*/
|
||||
public static String getDate(long time, String f) {
|
||||
return DateFormatUtils.format(new Date(time * 1000), f, DEFAULT_LOCALE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过字符串时间获取时间戳 nutzwk5.0改为long
|
||||
*
|
||||
* @param date
|
||||
* @return
|
||||
*/
|
||||
public static long getTime(String date) {
|
||||
try {
|
||||
return Times.parse(sdf, date).getTime() / 1000;
|
||||
} catch (ParseException e) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过字符串时间获取时间戳 nutzwk5.0改为long
|
||||
*
|
||||
* @param date
|
||||
* @return
|
||||
*/
|
||||
public static long getTime(SimpleDateFormat sdf, String date) {
|
||||
try {
|
||||
return Times.parse(sdf, date).getTime() / 1000;
|
||||
} catch (ParseException e) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 计算两个时间差
|
||||
*/
|
||||
public static String getDatePoor(Date endDate, Date nowDate) {
|
||||
long nd = 1000 * 24 * 60 * 60;
|
||||
long nh = 1000 * 60 * 60;
|
||||
long nm = 1000 * 60;
|
||||
// long ns = 1000;
|
||||
// 获得两个时间的毫秒时间差异
|
||||
long diff = endDate.getTime() - nowDate.getTime();
|
||||
// 计算差多少天
|
||||
long day = diff / nd;
|
||||
// 计算差多少小时
|
||||
long hour = diff % nd / nh;
|
||||
// 计算差多少分钟
|
||||
long min = diff % nd % nh / nm;
|
||||
// 计算差多少秒//输出结果
|
||||
// long sec = diff % nd % nh % nm / ns;
|
||||
return day + "天" + hour + "小时" + min + "分钟";
|
||||
}
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user