-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[10983][refactor] ResourcesController add pojo
- Loading branch information
Showing
15 changed files
with
579 additions
and
222 deletions.
There are no files selected for viewing
360 changes: 164 additions & 196 deletions
360
...r-api/src/main/java/org/apache/dolphinscheduler/api/controller/ResourcesV2Controller.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
...i/src/main/java/org/apache/dolphinscheduler/api/dto/resources/CreateResourceResponse.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,45 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You 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 org.apache.dolphinscheduler.api.dto.resources; | ||
|
||
import org.apache.dolphinscheduler.api.utils.Result; | ||
import org.apache.dolphinscheduler.dao.entity.Resource; | ||
|
||
/** | ||
* create resource response | ||
*/ | ||
public class CreateResourceResponse extends Result { | ||
|
||
private Resource data; | ||
|
||
public CreateResourceResponse(Result<Resource> result) { | ||
super(); | ||
this.setCode(result.getCode()); | ||
this.setMsg(result.getMsg()); | ||
this.setData(result.getData()); | ||
} | ||
|
||
@Override | ||
public Resource getData() { | ||
return data; | ||
} | ||
|
||
public void setData(Resource data) { | ||
this.data = data; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
.../src/main/java/org/apache/dolphinscheduler/api/dto/resources/ResourceContentResponse.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,44 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You 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 org.apache.dolphinscheduler.api.dto.resources; | ||
|
||
import org.apache.dolphinscheduler.api.utils.Result; | ||
|
||
/** | ||
* resource response | ||
*/ | ||
public class ResourceContentResponse extends Result { | ||
|
||
private ResourceContent data; | ||
|
||
public ResourceContentResponse(Result<ResourceContent> result) { | ||
super(); | ||
this.setCode(result.getCode()); | ||
this.setMsg(result.getMsg()); | ||
this.setData(result.getData()); | ||
} | ||
|
||
@Override | ||
public ResourceContent getData() { | ||
return data; | ||
} | ||
|
||
public void setData(ResourceContent data) { | ||
this.data = data; | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
...api/src/main/java/org/apache/dolphinscheduler/api/dto/resources/ResourceListResponse.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,46 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You 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 org.apache.dolphinscheduler.api.dto.resources; | ||
|
||
import org.apache.dolphinscheduler.api.utils.Result; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* resource list response | ||
*/ | ||
public class ResourceListResponse extends Result { | ||
|
||
private List<ResourceComponent> data; | ||
|
||
public ResourceListResponse(Result<List<ResourceComponent>> result) { | ||
super(); | ||
this.setCode(result.getCode()); | ||
this.setMsg(result.getMsg()); | ||
this.setData(result.getData()); | ||
} | ||
|
||
@Override | ||
public List<ResourceComponent> getData() { | ||
return data; | ||
} | ||
|
||
public void setData(List<ResourceComponent> data) { | ||
this.data = data; | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
...api/src/main/java/org/apache/dolphinscheduler/api/dto/resources/ResourcePageResponse.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,46 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You 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 org.apache.dolphinscheduler.api.dto.resources; | ||
|
||
import org.apache.dolphinscheduler.api.utils.PageInfo; | ||
import org.apache.dolphinscheduler.api.utils.Result; | ||
import org.apache.dolphinscheduler.dao.entity.Resource; | ||
|
||
/** | ||
* resource page response | ||
*/ | ||
public class ResourcePageResponse extends Result { | ||
|
||
private PageInfo<Resource> data; | ||
|
||
public ResourcePageResponse(Result<PageInfo<Resource>> result) { | ||
super(); | ||
this.setCode(result.getCode()); | ||
this.setMsg(result.getMsg()); | ||
this.setData(result.getData()); | ||
} | ||
|
||
@Override | ||
public PageInfo<Resource> getData() { | ||
return data; | ||
} | ||
|
||
public void setData(PageInfo<Resource> data) { | ||
this.data = data; | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
...ler-api/src/main/java/org/apache/dolphinscheduler/api/dto/resources/ResourceResponse.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,45 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You 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 org.apache.dolphinscheduler.api.dto.resources; | ||
|
||
import org.apache.dolphinscheduler.api.utils.Result; | ||
import org.apache.dolphinscheduler.dao.entity.Resource; | ||
|
||
/** | ||
* resource response | ||
*/ | ||
public class ResourceResponse extends Result { | ||
|
||
private Resource data; | ||
|
||
public ResourceResponse(Result<Resource> result) { | ||
super(); | ||
this.setCode(result.getCode()); | ||
this.setMsg(result.getMsg()); | ||
this.setData(result.getData()); | ||
} | ||
|
||
@Override | ||
public Resource getData() { | ||
return data; | ||
} | ||
|
||
public void setData(Resource data) { | ||
this.data = data; | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
...-api/src/main/java/org/apache/dolphinscheduler/api/dto/resources/UdfFuncListResponse.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,47 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You 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 org.apache.dolphinscheduler.api.dto.resources; | ||
|
||
import org.apache.dolphinscheduler.api.utils.Result; | ||
import org.apache.dolphinscheduler.dao.entity.UdfFunc; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* resource list response | ||
*/ | ||
public class UdfFuncListResponse extends Result { | ||
|
||
private List<UdfFunc> data; | ||
|
||
public UdfFuncListResponse(Result<List<UdfFunc>> result) { | ||
super(); | ||
this.setCode(result.getCode()); | ||
this.setMsg(result.getMsg()); | ||
this.setData(result.getData()); | ||
} | ||
|
||
@Override | ||
public List<UdfFunc> getData() { | ||
return data; | ||
} | ||
|
||
public void setData(List<UdfFunc> data) { | ||
this.data = data; | ||
} | ||
} |
Oops, something went wrong.