|
|
@ -1,7 +1,6 @@ |
|
|
|
package org.apache.dolphinscheduler.api.dto.resources; |
|
|
|
package org.apache.dolphinscheduler.api.dto.resources; |
|
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.annotation.JSONType; |
|
|
|
import com.fasterxml.jackson.annotation.JsonPropertyOrder; |
|
|
|
import com.alibaba.fastjson.annotation.JSONField; |
|
|
|
|
|
|
|
import org.apache.dolphinscheduler.common.enums.ResourceType; |
|
|
|
import org.apache.dolphinscheduler.common.enums.ResourceType; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
@ -26,7 +25,7 @@ import java.util.List; |
|
|
|
/** |
|
|
|
/** |
|
|
|
* resource component |
|
|
|
* resource component |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@JSONType(orders={"id","pid","name","fullName","description","isDirctory","children","type"}) |
|
|
|
@JsonPropertyOrder({"id","pid","name","fullName","description","isDirctory","children","type"}) |
|
|
|
public abstract class ResourceComponent { |
|
|
|
public abstract class ResourceComponent { |
|
|
|
public ResourceComponent() { |
|
|
|
public ResourceComponent() { |
|
|
|
} |
|
|
|
} |
|
|
@ -46,17 +45,14 @@ public abstract class ResourceComponent { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* id |
|
|
|
* id |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@JSONField(ordinal = 1) |
|
|
|
|
|
|
|
protected int id; |
|
|
|
protected int id; |
|
|
|
/** |
|
|
|
/** |
|
|
|
* parent id |
|
|
|
* parent id |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@JSONField(ordinal = 2) |
|
|
|
|
|
|
|
protected int pid; |
|
|
|
protected int pid; |
|
|
|
/** |
|
|
|
/** |
|
|
|
* name |
|
|
|
* name |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@JSONField(ordinal = 3) |
|
|
|
|
|
|
|
protected String name; |
|
|
|
protected String name; |
|
|
|
/** |
|
|
|
/** |
|
|
|
* current directory |
|
|
|
* current directory |
|
|
@ -65,32 +61,26 @@ public abstract class ResourceComponent { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* full name |
|
|
|
* full name |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@JSONField(ordinal = 4) |
|
|
|
|
|
|
|
protected String fullName; |
|
|
|
protected String fullName; |
|
|
|
/** |
|
|
|
/** |
|
|
|
* description |
|
|
|
* description |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@JSONField(ordinal = 5) |
|
|
|
|
|
|
|
protected String description; |
|
|
|
protected String description; |
|
|
|
/** |
|
|
|
/** |
|
|
|
* is directory |
|
|
|
* is directory |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@JSONField(ordinal = 6) |
|
|
|
|
|
|
|
protected boolean isDirctory; |
|
|
|
protected boolean isDirctory; |
|
|
|
/** |
|
|
|
/** |
|
|
|
* id value |
|
|
|
* id value |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@JSONField(ordinal = 7) |
|
|
|
|
|
|
|
protected String idValue; |
|
|
|
protected String idValue; |
|
|
|
/** |
|
|
|
/** |
|
|
|
* resoruce type |
|
|
|
* resoruce type |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@JSONField(ordinal = 8) |
|
|
|
|
|
|
|
protected ResourceType type; |
|
|
|
protected ResourceType type; |
|
|
|
/** |
|
|
|
/** |
|
|
|
* children |
|
|
|
* children |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@JSONField(ordinal = 8) |
|
|
|
|
|
|
|
protected List<ResourceComponent> children = new ArrayList<>(); |
|
|
|
protected List<ResourceComponent> children = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|