Skip to content

Commit

Permalink
Merge pull request #395 from sargentti/dev-1.0.0
Browse files Browse the repository at this point in the history
Add data API service module
  • Loading branch information
sargentti authored Aug 25, 2021
2 parents 32cca99 + 99b7403 commit 4d13301
Show file tree
Hide file tree
Showing 135 changed files with 13,120 additions and 0 deletions.
420 changes: 420 additions & 0 deletions dss-apps/dss-apiservice-server/pom.xml

Large diffs are not rendered by default.

44 changes: 44 additions & 0 deletions dss-apps/dss-apiservice-server/src/main/assembly/distribution.xml
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>

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")
}
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")
}
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
}
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;
}
}
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;
}
}
Loading

0 comments on commit 4d13301

Please sign in to comment.