-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #395 from sargentti/dev-1.0.0
Add data API service module
- Loading branch information
Showing
135 changed files
with
13,120 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
44 changes: 44 additions & 0 deletions
44
dss-apps/dss-apiservice-server/src/main/assembly/distribution.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<!-- | ||
~ Copyright 2019 WeBank | ||
~ 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. | ||
~ | ||
--> | ||
|
||
<assembly | ||
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/2.3" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/2.3 http://maven.apache.org/xsd/assembly-1.1.2.xsd"> | ||
<id>dss-apiService-server</id> | ||
<formats> | ||
<format>dir</format> | ||
</formats> | ||
<includeBaseDirectory>true</includeBaseDirectory> | ||
<baseDirectory>dss-apiservice-server</baseDirectory> | ||
|
||
<dependencySets> | ||
<dependencySet> | ||
<!-- Enable access to all projects in the current multimodule build! <useAllReactorProjects>true</useAllReactorProjects> --> | ||
<!-- Now, select which projects to include in this module-set. --> | ||
<outputDirectory>lib</outputDirectory> | ||
<useProjectArtifact>true</useProjectArtifact> | ||
<useTransitiveDependencies>true</useTransitiveDependencies> | ||
<unpack>false</unpack> | ||
<useStrictFiltering>true</useStrictFiltering> | ||
<useTransitiveFiltering>true</useTransitiveFiltering> | ||
</dependencySet> | ||
</dependencySets> | ||
|
||
|
||
|
||
</assembly> | ||
|
29 changes: 29 additions & 0 deletions
29
...rc/main/java/com/webank/wedatasphere/dss/apiservice/core/action/ApiServiceGetAction.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright 2019 WeBank | ||
* 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. | ||
* | ||
*/ | ||
|
||
package com.webank.wedatasphere.dss.apiservice.core.action | ||
|
||
import com.webank.wedatasphere.linkis.httpclient.request.GetAction | ||
import com.webank.wedatasphere.linkis.ujes.client.request.UJESJobAction | ||
|
||
/** | ||
* @author allenlliu | ||
* @date 2020/09/14 10:32 AM | ||
* @version 2.0.0 | ||
*/ | ||
class ApiServiceGetAction extends GetAction with UJESJobAction { | ||
override def suffixURLs: Array[String] = Array("dss","framework","workspace", "getWorkspaceIdByUserName") | ||
} |
38 changes: 38 additions & 0 deletions
38
...ain/java/com/webank/wedatasphere/dss/apiservice/core/action/ResultSetDownloadAction.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Copyright 2019 WeBank | ||
* 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. | ||
* | ||
*/ | ||
|
||
package com.webank.wedatasphere.dss.apiservice.core.action | ||
|
||
import com.webank.wedatasphere.linkis.httpclient.request.{DownloadAction, GetAction} | ||
import com.webank.wedatasphere.linkis.ujes.client.request.UJESJobAction | ||
|
||
import scala.tools.nsc.interpreter.InputStream | ||
|
||
/** | ||
* @author allenlliu | ||
* @version 2.0.0 | ||
*/ | ||
|
||
class ResultSetDownloadAction extends GetAction with DownloadAction with UJESJobAction { | ||
|
||
private var inputStream: InputStream = _ | ||
|
||
override def write(inputStream: InputStream): Unit = this.inputStream = inputStream | ||
|
||
def getInputStream: InputStream = inputStream | ||
|
||
override def suffixURLs: Array[String] = Array("filesystem", "resultsetToExcel") | ||
} |
33 changes: 33 additions & 0 deletions
33
...src/main/java/com/webank/wedatasphere/dss/apiservice/core/action/ResultWorkspaceIds.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright 2019 WeBank | ||
* 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. | ||
* | ||
*/ | ||
|
||
package com.webank.wedatasphere.dss.apiservice.core.action | ||
|
||
import com.webank.wedatasphere.linkis.httpclient.dws.annotation.DWSHttpMessageResult | ||
import com.webank.wedatasphere.linkis.httpclient.dws.response.DWSResult | ||
|
||
/** | ||
* @author allenlliu | ||
* @date 2020/09/14 11:44 AM | ||
* @version 2.0.0 | ||
*/ | ||
|
||
@DWSHttpMessageResult("/api/rest_j/v\\d+/dss/framework/workspace/getWorkspaceIdByUserName") | ||
class ResultWorkspaceIds extends DWSResult{ | ||
var userWorkspaceIds:String = _ | ||
def getUserWorkspaceIds:String = this.userWorkspaceIds | ||
def setUserWorkspaceIds(userWorkspaceIds:String):Unit = this.userWorkspaceIds = userWorkspaceIds | ||
} |
55 changes: 55 additions & 0 deletions
55
...ce-server/src/main/java/com/webank/wedatasphere/dss/apiservice/core/bo/ApiServiceJob.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
* Copyright 2019 WeBank | ||
* 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. | ||
* | ||
*/ | ||
|
||
package com.webank.wedatasphere.dss.apiservice.core.bo; | ||
|
||
import com.webank.wedatasphere.linkis.ujes.client.response.JobExecuteResult; | ||
|
||
/** | ||
* @author allenlliu | ||
* @version 2.0.0 | ||
* @date 2020/09/03 07:28 PM | ||
*/ | ||
public class ApiServiceJob { | ||
|
||
private String submitUser; | ||
private String proxyUser; | ||
private JobExecuteResult jobExecuteResult; | ||
public String getSubmitUser() { | ||
return submitUser; | ||
} | ||
|
||
public void setSubmitUser(String submitUser) { | ||
this.submitUser = submitUser; | ||
} | ||
|
||
|
||
|
||
public String getProxyUser() { | ||
return proxyUser; | ||
} | ||
|
||
public void setProxyUser(String proxyUser) { | ||
this.proxyUser = proxyUser; | ||
} | ||
public JobExecuteResult getJobExecuteResult() { | ||
return jobExecuteResult; | ||
} | ||
|
||
public void setJobExecuteResult(JobExecuteResult jobExecuteResult) { | ||
this.jobExecuteResult = jobExecuteResult; | ||
} | ||
} |
126 changes: 126 additions & 0 deletions
126
...-server/src/main/java/com/webank/wedatasphere/dss/apiservice/core/bo/ApiServiceQuery.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
/* | ||
* Copyright 2019 WeBank | ||
* 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. | ||
* | ||
*/ | ||
|
||
package com.webank.wedatasphere.dss.apiservice.core.bo; | ||
|
||
|
||
/** | ||
* query | ||
* | ||
* @author zhulixin | ||
*/ | ||
public class ApiServiceQuery { | ||
|
||
/** | ||
* 服务名称 | ||
*/ | ||
private String name; | ||
|
||
/** | ||
* 标签 | ||
*/ | ||
private String tag; | ||
|
||
/** | ||
* 状态 | ||
*/ | ||
private Integer status; | ||
|
||
/** | ||
* api创建者 | ||
*/ | ||
private String creator; | ||
|
||
private int currentPage; | ||
|
||
private int pageSize; | ||
|
||
public int getWorkspaceId() { | ||
return workspaceId; | ||
} | ||
|
||
public void setWorkspaceId(int workspaceId) { | ||
this.workspaceId = workspaceId; | ||
} | ||
|
||
private int workspaceId; | ||
|
||
public String getUserName() { | ||
return userName; | ||
} | ||
|
||
public void setUserName(String userName) { | ||
this.userName = userName; | ||
} | ||
|
||
private String userName; | ||
|
||
public ApiServiceQuery(String userName,String name, String tag, Integer status, String creator) { | ||
this.userName= userName; | ||
this.name = name; | ||
this.tag = tag; | ||
this.status = status; | ||
this.creator = creator; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
|
||
public String getTag() { | ||
return tag; | ||
} | ||
|
||
public void setTag(String tag) { | ||
this.tag = tag; | ||
} | ||
|
||
public Integer getStatus() { | ||
return status; | ||
} | ||
|
||
public void setStatus(Integer status) { | ||
this.status = status; | ||
} | ||
|
||
public String getCreator() { | ||
return creator; | ||
} | ||
|
||
public void setCreator(String creator) { | ||
this.creator = creator; | ||
} | ||
|
||
public int getCurrentPage() { | ||
return currentPage; | ||
} | ||
|
||
public void setCurrentPage(int currentPage) { | ||
this.currentPage = currentPage; | ||
} | ||
|
||
public int getPageSize() { | ||
return pageSize; | ||
} | ||
|
||
public void setPageSize(int pageSize) { | ||
this.pageSize = pageSize; | ||
} | ||
} |
Oops, something went wrong.