Skip to content

Commit 4d13301

Browse files
authored
Merge pull request #395 from sargentti/dev-1.0.0
Add data API service module
2 parents 32cca99 + 99b7403 commit 4d13301

File tree

135 files changed

+13120
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+13120
-0
lines changed

dss-apps/dss-apiservice-server/pom.xml

Lines changed: 420 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<!--
2+
~ Copyright 2019 WeBank
3+
~ Licensed under the Apache License, Version 2.0 (the "License");
4+
~ you may not use this file except in compliance with the License.
5+
~ You may obtain a copy of the License at
6+
~
7+
~ http://www.apache.org/licenses/LICENSE-2.0
8+
~
9+
~ Unless required by applicable law or agreed to in writing, software
10+
~ distributed under the License is distributed on an "AS IS" BASIS,
11+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
~ See the License for the specific language governing permissions and
13+
~ limitations under the License.
14+
~
15+
-->
16+
17+
<assembly
18+
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/2.3"
19+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20+
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/2.3 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
21+
<id>dss-apiService-server</id>
22+
<formats>
23+
<format>dir</format>
24+
</formats>
25+
<includeBaseDirectory>true</includeBaseDirectory>
26+
<baseDirectory>dss-apiservice-server</baseDirectory>
27+
28+
<dependencySets>
29+
<dependencySet>
30+
<!-- Enable access to all projects in the current multimodule build! <useAllReactorProjects>true</useAllReactorProjects> -->
31+
<!-- Now, select which projects to include in this module-set. -->
32+
<outputDirectory>lib</outputDirectory>
33+
<useProjectArtifact>true</useProjectArtifact>
34+
<useTransitiveDependencies>true</useTransitiveDependencies>
35+
<unpack>false</unpack>
36+
<useStrictFiltering>true</useStrictFiltering>
37+
<useTransitiveFiltering>true</useTransitiveFiltering>
38+
</dependencySet>
39+
</dependencySets>
40+
41+
42+
43+
</assembly>
44+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Copyright 2019 WeBank
3+
* Licensed under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License.
5+
* You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software
10+
* distributed under the License is distributed on an "AS IS" BASIS,
11+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
* See the License for the specific language governing permissions and
13+
* limitations under the License.
14+
*
15+
*/
16+
17+
package com.webank.wedatasphere.dss.apiservice.core.action
18+
19+
import com.webank.wedatasphere.linkis.httpclient.request.GetAction
20+
import com.webank.wedatasphere.linkis.ujes.client.request.UJESJobAction
21+
22+
/**
23+
* @author allenlliu
24+
* @date 2020/09/14 10:32 AM
25+
* @version 2.0.0
26+
*/
27+
class ApiServiceGetAction extends GetAction with UJESJobAction {
28+
override def suffixURLs: Array[String] = Array("dss","framework","workspace", "getWorkspaceIdByUserName")
29+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright 2019 WeBank
3+
* Licensed under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License.
5+
* You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software
10+
* distributed under the License is distributed on an "AS IS" BASIS,
11+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
* See the License for the specific language governing permissions and
13+
* limitations under the License.
14+
*
15+
*/
16+
17+
package com.webank.wedatasphere.dss.apiservice.core.action
18+
19+
import com.webank.wedatasphere.linkis.httpclient.request.{DownloadAction, GetAction}
20+
import com.webank.wedatasphere.linkis.ujes.client.request.UJESJobAction
21+
22+
import scala.tools.nsc.interpreter.InputStream
23+
24+
/**
25+
* @author allenlliu
26+
* @version 2.0.0
27+
*/
28+
29+
class ResultSetDownloadAction extends GetAction with DownloadAction with UJESJobAction {
30+
31+
private var inputStream: InputStream = _
32+
33+
override def write(inputStream: InputStream): Unit = this.inputStream = inputStream
34+
35+
def getInputStream: InputStream = inputStream
36+
37+
override def suffixURLs: Array[String] = Array("filesystem", "resultsetToExcel")
38+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* Copyright 2019 WeBank
3+
* Licensed under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License.
5+
* You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software
10+
* distributed under the License is distributed on an "AS IS" BASIS,
11+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
* See the License for the specific language governing permissions and
13+
* limitations under the License.
14+
*
15+
*/
16+
17+
package com.webank.wedatasphere.dss.apiservice.core.action
18+
19+
import com.webank.wedatasphere.linkis.httpclient.dws.annotation.DWSHttpMessageResult
20+
import com.webank.wedatasphere.linkis.httpclient.dws.response.DWSResult
21+
22+
/**
23+
* @author allenlliu
24+
* @date 2020/09/14 11:44 AM
25+
* @version 2.0.0
26+
*/
27+
28+
@DWSHttpMessageResult("/api/rest_j/v\\d+/dss/framework/workspace/getWorkspaceIdByUserName")
29+
class ResultWorkspaceIds extends DWSResult{
30+
var userWorkspaceIds:String = _
31+
def getUserWorkspaceIds:String = this.userWorkspaceIds
32+
def setUserWorkspaceIds(userWorkspaceIds:String):Unit = this.userWorkspaceIds = userWorkspaceIds
33+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
/*
2+
* Copyright 2019 WeBank
3+
* Licensed under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License.
5+
* You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software
10+
* distributed under the License is distributed on an "AS IS" BASIS,
11+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
* See the License for the specific language governing permissions and
13+
* limitations under the License.
14+
*
15+
*/
16+
17+
package com.webank.wedatasphere.dss.apiservice.core.bo;
18+
19+
import com.webank.wedatasphere.linkis.ujes.client.response.JobExecuteResult;
20+
21+
/**
22+
* @author allenlliu
23+
* @version 2.0.0
24+
* @date 2020/09/03 07:28 PM
25+
*/
26+
public class ApiServiceJob {
27+
28+
private String submitUser;
29+
private String proxyUser;
30+
private JobExecuteResult jobExecuteResult;
31+
public String getSubmitUser() {
32+
return submitUser;
33+
}
34+
35+
public void setSubmitUser(String submitUser) {
36+
this.submitUser = submitUser;
37+
}
38+
39+
40+
41+
public String getProxyUser() {
42+
return proxyUser;
43+
}
44+
45+
public void setProxyUser(String proxyUser) {
46+
this.proxyUser = proxyUser;
47+
}
48+
public JobExecuteResult getJobExecuteResult() {
49+
return jobExecuteResult;
50+
}
51+
52+
public void setJobExecuteResult(JobExecuteResult jobExecuteResult) {
53+
this.jobExecuteResult = jobExecuteResult;
54+
}
55+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
/*
2+
* Copyright 2019 WeBank
3+
* Licensed under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License.
5+
* You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software
10+
* distributed under the License is distributed on an "AS IS" BASIS,
11+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
* See the License for the specific language governing permissions and
13+
* limitations under the License.
14+
*
15+
*/
16+
17+
package com.webank.wedatasphere.dss.apiservice.core.bo;
18+
19+
20+
/**
21+
* query
22+
*
23+
* @author zhulixin
24+
*/
25+
public class ApiServiceQuery {
26+
27+
/**
28+
* 服务名称
29+
*/
30+
private String name;
31+
32+
/**
33+
* 标签
34+
*/
35+
private String tag;
36+
37+
/**
38+
* 状态
39+
*/
40+
private Integer status;
41+
42+
/**
43+
* api创建者
44+
*/
45+
private String creator;
46+
47+
private int currentPage;
48+
49+
private int pageSize;
50+
51+
public int getWorkspaceId() {
52+
return workspaceId;
53+
}
54+
55+
public void setWorkspaceId(int workspaceId) {
56+
this.workspaceId = workspaceId;
57+
}
58+
59+
private int workspaceId;
60+
61+
public String getUserName() {
62+
return userName;
63+
}
64+
65+
public void setUserName(String userName) {
66+
this.userName = userName;
67+
}
68+
69+
private String userName;
70+
71+
public ApiServiceQuery(String userName,String name, String tag, Integer status, String creator) {
72+
this.userName= userName;
73+
this.name = name;
74+
this.tag = tag;
75+
this.status = status;
76+
this.creator = creator;
77+
}
78+
79+
public String getName() {
80+
return name;
81+
}
82+
83+
public void setName(String name) {
84+
this.name = name;
85+
}
86+
87+
public String getTag() {
88+
return tag;
89+
}
90+
91+
public void setTag(String tag) {
92+
this.tag = tag;
93+
}
94+
95+
public Integer getStatus() {
96+
return status;
97+
}
98+
99+
public void setStatus(Integer status) {
100+
this.status = status;
101+
}
102+
103+
public String getCreator() {
104+
return creator;
105+
}
106+
107+
public void setCreator(String creator) {
108+
this.creator = creator;
109+
}
110+
111+
public int getCurrentPage() {
112+
return currentPage;
113+
}
114+
115+
public void setCurrentPage(int currentPage) {
116+
this.currentPage = currentPage;
117+
}
118+
119+
public int getPageSize() {
120+
return pageSize;
121+
}
122+
123+
public void setPageSize(int pageSize) {
124+
this.pageSize = pageSize;
125+
}
126+
}

0 commit comments

Comments
 (0)