| Modifier and Type | Class and Description |
|---|---|
static class |
ResourceDags.Error |
static class |
ResourceDags.Message |
static class |
ResourceDags.Model |
static class |
ResourceDags.TopologicalReturnType |
| Modifier and Type | Field and Description |
|---|---|
static String |
__BUSES |
static String |
__DAGS |
static String |
__DESCRIPTION |
static String |
__EVENTS |
static String |
__NODES |
static String |
__STATES |
static String |
__SUBS |
static String |
__VERSIONS |
static String |
_CURR_VER |
static String |
_FILTER |
static String |
_INFO |
static String |
_ISOMORPH |
static String |
_JOURNAL |
static String |
_NEXT_VER |
static String |
_PING |
static String |
_RELOAD |
static String |
_RELOAD_ME |
static String |
_RULES |
static String |
_SEARCH |
static String |
_TOPOLOGICAL |
static String |
_VIEWS |
| Constructor and Description |
|---|
ResourceDags() |
| Modifier and Type | Method and Description |
|---|---|
org.glassfish.jersey.server.mvc.Viewable |
dag_GET_HTML(String dagName) |
net.aequologica.neo.dagr.model.Dag |
dag_GET_JSON(String dagName)
retrieve one dag
|
javax.ws.rs.core.Response |
dagBus_DELETE(String dagName,
Scope scope)
cancel cleaning of one dag
|
javax.ws.rs.core.Response |
dagBus_GET(String dagName,
Scope scope) |
javax.ws.rs.core.Response |
dagBus_PATCH(String dagName,
Scope scope)
Deprecated.
use PUT instead
|
javax.ws.rs.core.Response |
dagBus_PUT(String dagName,
Scope scope)
trigger cleaning of one dag
|
String |
dagBusJournal_GET_TEXT_PLAIN(String dagName,
Scope scope)
get journal of cleaning process
|
javax.ws.rs.core.Response |
dagBusNode_PATCH(String dagName,
Scope scope,
String nodeName,
Boolean skipRelease)
Deprecated.
|
javax.ws.rs.core.Response |
dagBusNode_PUT(String dagName,
Scope scope,
String nodeName,
Boolean skipRelease)
Deprecated.
use PUT instead
|
javax.ws.rs.core.Response |
dagBusNodeEvent_PATCH(String cleanerId,
String dagName,
Scope scope,
String nodeName,
BusEvent.Type eventType)
Deprecated.
|
javax.ws.rs.core.Response |
dagBusNodeEvent_PUT(String cleanerId,
String dagName,
Scope scope,
String nodeName,
BusEvent.Type eventType)
send an event about the cleaning process (i.e.
|
javax.ws.rs.core.Response |
dagBusNodeRules_GET_JSONfinal(String dagkey,
boolean withArtifact) |
DagOnSteroids.NodeCleaner.NodeState |
dagBusNodeState_GET_JSONfinal(String dagName,
Scope scope,
String nodeName)
retrieve the state of one node
|
javax.ws.rs.core.Response |
dagBusNodeState_PATCH_JSON(String dagName,
Scope scope,
String nodeName,
DagOnSteroids.NodeCleaner.NodeState newState)
Deprecated.
|
javax.ws.rs.core.Response |
dagBusNodeState_PUT_JSON(String dagkey,
Scope scope,
String nodename,
DagOnSteroids.NodeCleaner.NodeState newState)
Deprecated.
use PUT instead
|
javax.ws.rs.core.Response |
dagBusSub_DELETE(String dagName,
Scope scope,
String subDagKey)
cancel cleaning of one sub-dag
|
javax.ws.rs.core.Response |
dagBusSub_PATCH(String dagName,
Scope scope,
String subDagKey)
Deprecated.
use PUT instead
|
javax.ws.rs.core.Response |
dagBusSub_PUT(String dagName,
Scope scope,
String subDagKey)
trigger cleaning of one sub-dag
|
javax.ws.rs.core.Response |
dagCurrent_GET(String dagName) |
javax.ws.rs.core.Response |
dagFilter_POST(String jsonQuery,
String dagName,
Boolean returnSingleElementArray)
slice and filter and map and transform dag structured data
|
DagInfo |
dagInfo_GET_JSON(String dagName)
retrieve one dag metadata
|
List<DagInfo> |
dagInfos_GET_JSON() |
org.glassfish.jersey.server.mvc.Viewable |
dagList_GET_HTML() |
javax.ws.rs.core.Response |
dagNext_GET(String dagName,
Boolean allowSnapshots) |
net.aequologica.neo.dagr.model.Dag.Node |
dagNode_GET_JSON(String dagName,
String node)
get one node of one dag
|
String |
dagNodeCurrentVersion_GET_JSON(String dagName,
String node) |
String |
dagNodeNextVersions_GET_JSON(String dagName,
String node,
Boolean allowSnapshots) |
Collection<net.aequologica.neo.dagr.model.Dag.Node> |
dagNodes_GET_JSON(String dagName)
get all nodes of one dag
|
javax.ws.rs.core.Response |
dagReloadAll_POST()
reload all dags
|
javax.ws.rs.core.Response |
dagReloadThis_POST(String dagName)
reload one dag
|
List<String> |
dagSearch_GET(String nodeName,
String key,
String value)
search all dags for nodes with a given name and/or a given attribute, if any.
|
void |
dagSub_DELETE(String dagName,
String subDagKey) |
org.glassfish.jersey.server.mvc.Viewable |
dagSub_GET_HTML(String dagName,
String subkey) |
net.aequologica.neo.dagr.model.Dag |
dagSub_GET_JSON(String dagName,
String subDagKey,
net.aequologica.neo.dagr.model.SubDagIncludes includes,
Integer depth)
retrieve a sub-dag
|
String |
dagSub_POST(Set<String> nodeNames,
String dagName,
net.aequologica.neo.dagr.model.SubDagIncludes includes,
Integer depth)
create a sub-dag from a set of node names
|
Collection<Map.Entry<String,SortedSet<String>>> |
dagSubs_GET(String dagName)
retrieve all sub-dags of one dag
|
String |
dagSubSave_PUT_JSON(String dagName,
String subDagKey,
String description) |
Collection<List<net.aequologica.neo.dagr.model.Pair<net.aequologica.neo.dagr.model.Dag.Node,net.aequologica.neo.dagr.model.Dag.Node>>> |
isomorph_GET_JSON(String dagName,
String otherDagName)
check if two dags are isomorph
|
String |
ping_GET_TEXT()
verify that entry point is alive and kicking
|
void |
postConstruct() |
List<String> |
topological_GET_JSON(String dagName,
ResourceDags.TopologicalReturnType type)
get a topological sort of all nodes of one dag
|
void |
update(Observable o,
Object arg) |
public static final String _PING
public static final String _VIEWS
public static final String __DAGS
public static final String __BUSES
public static final String __SUBS
public static final String __NODES
public static final String __VERSIONS
public static final String __STATES
public static final String __EVENTS
public static final String __DESCRIPTION
public static final String _RELOAD
public static final String _SEARCH
public static final String _INFO
public static final String _JOURNAL
public static final String _RELOAD_ME
public static final String _RULES
public static final String _FILTER
public static final String _CURR_VER
public static final String _NEXT_VER
public static final String _TOPOLOGICAL
public static final String _ISOMORPH
@Inject
public ResourceDags()
throws IOException
IOException@PostConstruct public void postConstruct()
public void update(Observable o, Object arg)
@GET @Path(value="_ping_") @Produces(value="text/plain") public String ping_GET_TEXT()
@POST @Path(value="/dags/reload") @Produces(value="application/json") public javax.ws.rs.core.Response dagReloadAll_POST()
returns an array of objects; each object maps a dag name to an array of exceptions/warnings; array is empty when dag reload is ok.
e.g.:
[{
"good dag name": []
},{
"baad dag name": [{
"Exception": "Tabernacle!"
}]
}]
@POST
@Path(value="/dags/{dag}/reload")
@Produces(value="application/json")
public javax.ws.rs.core.Response dagReloadThis_POST(@PathParam(value="dag")
String dagName)
dagName - the name of the dag@GET @Path(value="/dags/search") @Consumes(value="text/plain") @Produces(value="application/json") public List<String> dagSearch_GET(@QueryParam(value="node") @DefaultValue(value="") String nodeName, @QueryParam(value="key") @DefaultValue(value="") String key, @QueryParam(value="value") @DefaultValue(value="") String value)
returns an array of dag names.
if node is null or empty, all nodes are searched for the matching attribute.
if node is null or empty, and one of key or value is null or empty, then an empty array is returned.
key - node attribute, e.g. "id" or "value.branch".node - search for dags that contains a node with this name.value - string or regular expression to match, e.g. "develop" or "dev.*".Exception@GET @Path(value="/dags/") @Produces(value="application/json") public List<DagInfo> dagInfos_GET_JSON() throws IOException
IOException@GET
@Path(value="/dags/{dag}")
@Produces(value="application/json")
public net.aequologica.neo.dagr.model.Dag dag_GET_JSON(@PathParam(value="dag")
String dagName)
throws IOException
dagName - IOException@GET
@Path(value="/dags/{dag}/info")
@Produces(value="application/json")
public DagInfo dagInfo_GET_JSON(@PathParam(value="dag")
String dagName)
throws Exception
dagName - Exception@POST
@Path(value="/dags/{dag}/filter")
@Consumes(value="text/plain")
@Produces(value="application/json")
public javax.ws.rs.core.Response dagFilter_POST(String jsonQuery,
@PathParam(value="dag")
String dagName,
@QueryParam(value="returnSingleElementArray") @DefaultValue(value="false")
Boolean returnSingleElementArray)
throws Exception
using jackson-jq, a java port of jq (try it here)
e.g.: request body to select all SNAPSHOT nodes:
.nodes[] | select(.value.gucrid | test("SNAPSHOT$")) | .name
if the request body is not semantically correct, method returns 422 Unprocessable Entity with the description of the error.
e.g..nodes[]value (missing point between [] and value) returns
{ "error": "Encountered 'value' at line 1, column 9. Was expecting one of:
<EOF>
'and' ...
'or' ...
(...)
Optional query parameter returnSingleElementArray:
if returnSingleElementArray is false (default), and the return value would be an array containing only one element, then the element itself is returned instead of the array
nodeNames - json array of node namesdagName - name of the dagreturnSingleElementArray - default falseException - json query compilation or execution error@GET
@Path(value="/dags/{dag}/current")
@Produces(value="application/json")
public javax.ws.rs.core.Response dagCurrent_GET(@PathParam(value="dag")
String dagName)
throws Exception
Exception@GET
@Path(value="/dags/{dag}/next")
@Produces(value="application/json")
public javax.ws.rs.core.Response dagNext_GET(@PathParam(value="dag")
String dagName,
@QueryParam(value="allowSnapshots") @DefaultValue(value="true")
Boolean allowSnapshots)
throws Exception
Exception@GET
@Path(value="/dags/{dag}/subs/")
@Produces(value="application/json")
public Collection<Map.Entry<String,SortedSet<String>>> dagSubs_GET(@PathParam(value="dag")
String dagName)
throws Exception
dagName - Exception@POST
@Path(value="/dags/{dag}/subs/")
@Consumes(value="application/json")
@Produces(value="text/plain")
public String dagSub_POST(Set<String> nodeNames,
@PathParam(value="dag")
String dagName,
@QueryParam(value="with")
net.aequologica.neo.dagr.model.SubDagIncludes includes,
@QueryParam(value="depth") @DefaultValue(value="0")
Integer depth)
throws Exception
(optional) query parameter "with"
one of "PREDECESSORS" or "SUCCESSORS", default is null)
add predecessors or successors nodes (and relevant links)
(optional) query parameter "depth" (integer default is 0)
| depth | |
|---|---|
| 0 | do not add any predecessors or successors |
| 1 | if "with" query parameter is not null, add only direct predecessors or successors (and relevant links) to the result |
| -1 | if "with" query parameter is not null, add all transitive predecessors or successors (and relevant links) to the result |
nodeNames - dagName - includes - depth - Exception@GET
@Path(value="/dags/{dag}/subs/{sub}")
@Produces(value="application/json")
public net.aequologica.neo.dagr.model.Dag dagSub_GET_JSON(@PathParam(value="dag")
String dagName,
@PathParam(value="sub")
String subDagKey,
@QueryParam(value="with")
net.aequologica.neo.dagr.model.SubDagIncludes includes,
@QueryParam(value="depth") @DefaultValue(value="0")
Integer depth)
throws Exception
(optional) query parameter "with"
one of "PREDECESSORS" or "SUCCESSORS", default is null)
add predecessors or successors nodes (and relevant links)
(optional) query parameter "depth" (integer default is 0)
| depth | |
|---|---|
| 0 | do not add any predecessors or successors |
| 1 | if "with" query parameter is not null, add only direct predecessors or successors (and relevant links) to the result |
| -1 | if "with" query parameter is not null, add all transitive predecessors or successors (and relevant links) to the result |
dagName - subDagKey - includes - depth - Exception@POST
@Path(value="/dags/{dag}/subs/{sub}/description/{description}")
@Produces(value="text/plain")
public String dagSubSave_PUT_JSON(@PathParam(value="dag")
String dagName,
@PathParam(value="sub")
String subDagKey,
@PathParam(value="description")
String description)
throws Exception
Exception@DELETE
@Path(value="/dags/{dag}/subs/{sub}")
public void dagSub_DELETE(@PathParam(value="dag")
String dagName,
@PathParam(value="sub")
String subDagKey)
throws Exception
Exception@GET
@Path(value="/dags/{dag}/isomorph/{otherDag}")
@Produces(value="application/json")
public Collection<List<net.aequologica.neo.dagr.model.Pair<net.aequologica.neo.dagr.model.Dag.Node,net.aequologica.neo.dagr.model.Dag.Node>>> isomorph_GET_JSON(@PathParam(value="dag")
String dagName,
@PathParam(value="otherDag")
String otherDagName)
throws Exception
cf. https://en.wikipedia.org/wiki/Graph_isomorphism
return an empty array if dags are not isomorphis dag are isomorph, return a mapping of nodes between left and right dags, e.g.:
[[{
"left": {
"id": "infinite",
"name": "8",
},
"right": {
"id": "fin",
"name": "fin",
}
}]
dagName - otherDagName - Exception@GET
@Path(value="/dags/{dag}/topological")
@Produces(value="application/json")
public List<String> topological_GET_JSON(@PathParam(value="dag")
String dagName,
@QueryParam(value="type") @DefaultValue(value="ID")
ResourceDags.TopologicalReturnType type)
throws Exception
dagName - type - Exception@GET
@Path(value="/dags/{dag}/buses/{bus}/journal")
@Produces(value="text/plain")
public String dagBusJournal_GET_TEXT_PLAIN(@PathParam(value="dag")
String dagName,
@PathParam(value="bus")
Scope scope)
throws Exception
dagName - scope - Exception@DELETE
@Path(value="/dags/{dag}/buses/{bus}")
@Produces(value="application/json")
public javax.ws.rs.core.Response dagBus_DELETE(@PathParam(value="dag")
String dagName,
@PathParam(value="bus")
Scope scope)
throws Exception
dagName - scope - Exception@DELETE
@Path(value="/dags/{dag}/buses/{bus}/subs/{sub}")
@Produces(value="application/json")
public javax.ws.rs.core.Response dagBusSub_DELETE(@PathParam(value="dag")
String dagName,
@PathParam(value="bus")
Scope scope,
@PathParam(value="sub")
String subDagKey)
throws Exception
dagName - scope - subDagKey - Exception@GET
@Path(value="/dags/{dag}/buses/{bus}")
@Produces(value="text/plain")
public javax.ws.rs.core.Response dagBus_GET(@PathParam(value="dag")
String dagName,
@PathParam(value="bus")
Scope scope)
throws Exception
Exception@PUT
@Path(value="/dags/{dag}/buses/{bus}")
@Produces(value="application/json")
public javax.ws.rs.core.Response dagBus_PUT(@PathParam(value="dag")
String dagName,
@PathParam(value="bus")
Scope scope)
throws Exception
dagName - scope - Exception@PATCH @Deprecated @Path(value="/dags/{dag}/buses/{bus}") @Produces(value="application/json") public javax.ws.rs.core.Response dagBus_PATCH(@PathParam(value="dag") String dagName, @PathParam(value="bus") Scope scope) throws Exception
dagName - scope - Exception@PUT
@Path(value="/dags/{dag}/buses/{bus}/subs/{sub}")
@Produces(value="application/json")
public javax.ws.rs.core.Response dagBusSub_PUT(@PathParam(value="dag")
String dagName,
@PathParam(value="bus")
Scope scope,
@PathParam(value="sub")
String subDagKey)
throws Exception
dagName - scope - subDagKey - Exception@PATCH @Deprecated @Path(value="/dags/{dag}/buses/{bus}/subs/{sub}") @Produces(value="application/json") public javax.ws.rs.core.Response dagBusSub_PATCH(@PathParam(value="dag") String dagName, @PathParam(value="bus") Scope scope, @PathParam(value="sub") String subDagKey) throws Exception
dagName - scope - subDagKey - Exception@GET
@Path(value="/dags/{dag}/nodes/")
@Produces(value="application/json")
public Collection<net.aequologica.neo.dagr.model.Dag.Node> dagNodes_GET_JSON(@PathParam(value="dag")
String dagName)
throws Exception
dagName - Exception@GET
@Path(value="/dags/{dag}/nodes/{node}")
@Produces(value="application/json")
public net.aequologica.neo.dagr.model.Dag.Node dagNode_GET_JSON(@PathParam(value="dag")
String dagName,
@PathParam(value="node")
String node)
throws Exception
dagName - node - Exception@GET
@Path(value="/dags/{dag}/nodes/{node}/versions/current")
@Produces(value="application/json")
public String dagNodeCurrentVersion_GET_JSON(@PathParam(value="dag")
String dagName,
@PathParam(value="node")
String node)
throws Exception
Exception@GET
@Path(value="/dags/{dag}/nodes/{node}/versions/next")
@Produces(value="application/json")
public String dagNodeNextVersions_GET_JSON(@PathParam(value="dag")
String dagName,
@PathParam(value="node")
String node,
@QueryParam(value="allowSnapshots") @DefaultValue(value="true")
Boolean allowSnapshots)
throws Exception
Exception@GET
@Path(value="/dags/{dag}/buses/{bus}/nodes/{node}/states/")
@Produces(value="application/json")
public DagOnSteroids.NodeCleaner.NodeState dagBusNodeState_GET_JSONfinal(@PathParam(value="dag")
String dagName,
@PathParam(value="bus")
Scope scope,
@PathParam(value="node")
String nodeName)
throws Exception
dagName - scope - nodeName - Exception@PATCH @Deprecated @Path(value="/dags/{dag}/buses/{bus}/nodes/{node}") @Produces(value="application/json") public javax.ws.rs.core.Response dagBusNode_PATCH(@PathParam(value="dag") String dagName, @PathParam(value="bus") Scope scope, @PathParam(value="node") String nodeName, @PathParam(value="skipRelease") @DefaultValue(value="false") Boolean skipRelease) throws Exception
dagName - scope - nodeName - skipRelease - Exception@PUT
@Path(value="/dags/{dag}/buses/{bus}/nodes/{node}")
@Produces(value="application/json")
public javax.ws.rs.core.Response dagBusNode_PUT(@PathParam(value="dag")
String dagName,
@PathParam(value="bus")
Scope scope,
@PathParam(value="node")
String nodeName,
@PathParam(value="skipRelease") @DefaultValue(value="false")
Boolean skipRelease)
throws Exception
dagName - scope - nodeName - skipRelease - Exception@PATCH @Deprecated @Path(value="/dags/{dag}/buses/{bus}/nodes/{node}/states/{state}") @Produces(value="application/json") public javax.ws.rs.core.Response dagBusNodeState_PATCH_JSON(@PathParam(value="dag") String dagName, @PathParam(value="bus") Scope scope, @PathParam(value="node") String nodeName, @PathParam(value="state") DagOnSteroids.NodeCleaner.NodeState newState) throws Exception
dagName - scope - nodeName - newState - Exception@PUT
@Path(value="/dags/{dag}/buses/{bus}/nodes/{node}/states/{state}")
@Produces(value="application/json")
public javax.ws.rs.core.Response dagBusNodeState_PUT_JSON(@PathParam(value="dag")
String dagkey,
@PathParam(value="bus")
Scope scope,
@PathParam(value="node")
String nodename,
@PathParam(value="state")
DagOnSteroids.NodeCleaner.NodeState newState)
throws Exception
dagName - scope - nodeName - newState - Exception@GET
@Path(value="/dags/{dag}/rules")
@Produces(value="application/xml")
public javax.ws.rs.core.Response dagBusNodeRules_GET_JSONfinal(@PathParam(value="dag")
String dagkey,
@QueryParam(value="withArtifact") @DefaultValue(value="false")
boolean withArtifact)
throws Exception
Exception@PUT
@Path(value="/dags/{dag}/buses/{bus}/nodes/{node}/events/{event}")
@Consumes(value="text/plain")
@Produces(value="application/json")
public javax.ws.rs.core.Response dagBusNodeEvent_PUT(String cleanerId,
@PathParam(value="dag")
String dagName,
@PathParam(value="bus")
Scope scope,
@PathParam(value="node")
String nodeName,
@PathParam(value="event")
BusEvent.Type eventType)
@PATCH @Deprecated @Path(value="/dags/{dag}/buses/{bus}/nodes/{node}/events/{event}") @Consumes(value="text/plain") @Produces(value="application/json") public javax.ws.rs.core.Response dagBusNodeEvent_PATCH(String cleanerId, @PathParam(value="dag") String dagName, @PathParam(value="bus") Scope scope, @PathParam(value="node") String nodeName, @PathParam(value="event") BusEvent.Type eventType)
@GET
@Path(value="/views/dags/")
@Produces(value="text/html")
public org.glassfish.jersey.server.mvc.Viewable dagList_GET_HTML()
throws IOException
IOException@GET
@Path(value="/views/dags/{dag}")
@Produces(value="text/html")
public org.glassfish.jersey.server.mvc.Viewable dag_GET_HTML(@PathParam(value="dag")
String dagName)
Copyright © 2019 aequologica. All rights reserved.