-
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
- Loading branch information
Showing
21 changed files
with
1,757 additions
and
244 deletions.
There are no files selected for viewing
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
103 changes: 52 additions & 51 deletions
103
...ler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ResourcesController.java
Large diffs are not rendered by default.
Oops, something went wrong.
802 changes: 802 additions & 0 deletions
802
...r-api/src/main/java/org/apache/dolphinscheduler/api/controller/ResourcesV2Controller.java
Large diffs are not rendered by default.
Oops, something went wrong.
52 changes: 52 additions & 0 deletions
52
...i/src/main/java/org/apache/dolphinscheduler/api/dto/resources/CreateDirectoryRequest.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,52 @@ | ||
/* | ||
* 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.spi.enums.ResourceType; | ||
|
||
import java.io.Serializable; | ||
|
||
import io.swagger.annotations.ApiModel; | ||
import io.swagger.annotations.ApiModelProperty; | ||
import lombok.Data; | ||
|
||
/** | ||
* @author lgt | ||
*/ | ||
@Data | ||
@ApiModel(value = "CREATE_RESOURCE_NOTES") | ||
public class CreateDirectoryRequest implements Serializable { | ||
|
||
private static final long serialVersionUID = 2158023425391177729L; | ||
|
||
@ApiModelProperty(name = "type", value = "RESOURCE_TYPE", required = true, example = "FILE") | ||
private ResourceType type; | ||
|
||
@ApiModelProperty(name = "name", value = "RESOURCE_NAME", required = true) | ||
private String name; | ||
|
||
@ApiModelProperty(name = "description", value = "RESOURCE_DESC") | ||
private String description; | ||
|
||
@ApiModelProperty(name = "pid", value = "RESOURCE_PID", required = true, example = "10") | ||
private int pid; | ||
|
||
@ApiModelProperty(name = "currentDir", value = "RESOURCE_CURRENT_DIR", required = true, example = "firstDir") | ||
private String currentDir; | ||
|
||
} |
55 changes: 55 additions & 0 deletions
55
...pi/src/main/java/org/apache/dolphinscheduler/api/dto/resources/CreateResourceRequest.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 @@ | ||
/* | ||
* 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.spi.enums.ResourceType; | ||
|
||
import java.io.Serializable; | ||
|
||
import io.swagger.annotations.ApiModelProperty; | ||
import lombok.Data; | ||
|
||
/** | ||
* @author lgt | ||
*/ | ||
@Data | ||
public class CreateResourceRequest implements Serializable { | ||
|
||
private static final long serialVersionUID = -4751002150934450475L; | ||
|
||
@ApiModelProperty(name = "type", value = "RESOURCE_TYPE", notes = "FILE , UDF", required = true, example = "FILE") | ||
private ResourceType type; | ||
|
||
@ApiModelProperty(name = "fileName", value = "RESOURCE_NAME", required = true) | ||
private String fileName; | ||
|
||
@ApiModelProperty(name = "suffix", value = "SUFFIX", required = true) | ||
private String suffix; | ||
|
||
@ApiModelProperty(name = "description", value = "RESOURCE_DESC") | ||
private String description; | ||
|
||
@ApiModelProperty(name = "pid", value = "RESOURCE_PID", required = true, example = "10") | ||
private int pid; | ||
|
||
@ApiModelProperty(name = "content", value = "CONTENT", required = true) | ||
private String content; | ||
|
||
@ApiModelProperty(name = "currentDir", value = "RESOURCE_CURRENT_DIR", required = true, example = "firstDir") | ||
private String currentDir; | ||
} |
52 changes: 52 additions & 0 deletions
52
...ler-api/src/main/java/org/apache/dolphinscheduler/api/dto/resources/CreateUdfRequest.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,52 @@ | ||
/* | ||
* 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.common.enums.UdfType; | ||
|
||
import java.io.Serializable; | ||
|
||
import io.swagger.annotations.ApiModelProperty; | ||
import lombok.Data; | ||
|
||
/** | ||
* @author lgt | ||
*/ | ||
@Data | ||
public class CreateUdfRequest implements Serializable { | ||
|
||
private static final long serialVersionUID = 808084395565216909L; | ||
|
||
@ApiModelProperty(name = "type", value = "UDF_TYPE", required = true, dataType = "UdfType", example = "HIVE,SPARK") | ||
private UdfType type; | ||
|
||
@ApiModelProperty(name = "funcName", value = "FUNC_NAME", required = true, dataType = "String", example = "evaluate") | ||
private String funcName; | ||
|
||
@ApiModelProperty(name = "className", value = "CLASS_NAME", required = true, dataType = "String", example = "GetLength") | ||
private String className; | ||
|
||
@ApiModelProperty(name = "argTypes", value = "ARG_TYPES", dataType = "String", example = "String") | ||
private String argTypes; | ||
|
||
@ApiModelProperty(name = "database", value = "DATABASE_NAME", dataType = "String", example = "db") | ||
private String database; | ||
|
||
@ApiModelProperty(name = "description", value = "UDF_DESC", dataType = "String", example = "description") | ||
private String description; | ||
} |
37 changes: 37 additions & 0 deletions
37
...uler-api/src/main/java/org/apache/dolphinscheduler/api/dto/resources/ResourceContent.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,37 @@ | ||
/* | ||
* 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 java.io.Serializable; | ||
|
||
import lombok.Data; | ||
|
||
/** | ||
* @author lgt | ||
*/ | ||
@Data | ||
public class ResourceContent implements Serializable { | ||
|
||
private static final long serialVersionUID = 7030124374980790556L; | ||
|
||
private String content; | ||
|
||
private String alias; | ||
|
||
private String fileName; | ||
} |
35 changes: 35 additions & 0 deletions
35
...main/java/org/apache/dolphinscheduler/api/dto/resources/UpdateResourceContentRequest.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,35 @@ | ||
/* | ||
* 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 java.io.Serializable; | ||
|
||
import io.swagger.annotations.ApiModelProperty; | ||
import lombok.Data; | ||
|
||
/** | ||
* @author lgt | ||
*/ | ||
@Data | ||
public class UpdateResourceContentRequest implements Serializable { | ||
|
||
private static final long serialVersionUID = 915936285961774517L; | ||
|
||
@ApiModelProperty(name = "content", value = "CONTENT", required = true, example = "content") | ||
private String content; | ||
} |
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
Oops, something went wrong.