Package com.powsybl.afs.ws.server
Class AppStorageServer
- java.lang.Object
-
- com.powsybl.afs.ws.server.AppStorageServer
-
@Named @ApplicationScoped @Path("afs/v1") public class AppStorageServer extends Object
- Author:
- Ali Tahanout
, Geoffroy Jamgotchian
-
-
Constructor Summary
Constructors Constructor Description AppStorageServer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.Response
addDependency(String fileSystemName, String nodeId, String name, String toNodeId)
javax.ws.rs.core.Response
addDoubleTimeSeriesData(String fileSystemName, String nodeId, int version, String timeSeriesName, List<com.powsybl.timeseries.DoubleDataChunk> chunks)
javax.ws.rs.core.Response
addStringTimeSeriesData(String fileSystemName, String nodeId, int version, String timeSeriesName, List<com.powsybl.timeseries.StringDataChunk> chunks)
javax.ws.rs.core.Response
cancel(String fileSystemName, String taskId)
javax.ws.rs.core.Response
check(String fileSystemName, String types, Long instant, boolean repair)
javax.ws.rs.core.Response
clearTimeSeries(String fileSystemName, String nodeId)
javax.ws.rs.core.Response
createNode(String fileSystemName, String nodeId, String childName, String description, String nodePseudoClass, int version, com.powsybl.afs.storage.NodeGenericMetadata nodeMetadata)
javax.ws.rs.core.Response
createRootNodeIfNotExists(String fileSystemName, String nodeName, String nodePseudoClass)
javax.ws.rs.core.Response
createTimeSeries(String fileSystemName, String nodeId, com.powsybl.timeseries.TimeSeriesMetadata metadata)
javax.ws.rs.core.Response
dataExists(String fileSystemName, String nodeId, String name)
javax.ws.rs.core.Response
deleteNode(String fileSystemName, String nodeId)
javax.ws.rs.core.Response
flush(String fileSystemName, com.powsybl.afs.storage.buffer.StorageChangeSet changeSet)
javax.ws.rs.core.Response
getBackwardDependencies(String fileSystemName, String nodeId)
javax.ws.rs.core.Response
getChildNode(String fileSystemName, String nodeId, String childName)
javax.ws.rs.core.Response
getChildNodes(String fileSystemName, String nodeId)
javax.ws.rs.core.Response
getDataNames(String fileSystemName, String nodeId)
javax.ws.rs.core.Response
getDependencies(String fileSystemName, String nodeId)
javax.ws.rs.core.Response
getDependencies(String fileSystemName, String nodeId, String name)
javax.ws.rs.core.Response
getDoubleTimeSeriesData(String fileSystemName, String nodeId, int version, Set<String> timeSeriesNames)
javax.ws.rs.core.Response
getFileSystemNames()
javax.ws.rs.core.Response
getInconsistentChildrenNodes(String fileSystemName)
javax.ws.rs.core.Response
getNodeInfo(String fileSystemName, String nodeId)
javax.ws.rs.core.Response
getParentNode(String fileSystemName, String nodeId)
javax.ws.rs.core.Response
getStringTimeSeriesData(String fileSystemName, String nodeId, int version, Set<String> timeSeriesNames)
javax.ws.rs.core.Response
getTimeSeriesDataVersions(String fileSystemName, String nodeId)
javax.ws.rs.core.Response
getTimeSeriesDataVersions(String fileSystemName, String nodeId, String timeSeriesName)
javax.ws.rs.core.Response
getTimeSeriesMetadata(String fileSystemName, String nodeId, Set<String> timeSeriesNames)
javax.ws.rs.core.Response
getTimeSeriesNames(String fileSystemName, String nodeId)
javax.ws.rs.core.Response
isConsistent(String fileSystemName, String nodeId)
javax.ws.rs.core.Response
isWritable(String fileSystemName, String nodeId)
javax.ws.rs.core.Response
readBinaryAttribute(String fileSystemName, String nodeId, String name)
javax.ws.rs.core.Response
removeData(String fileSystemName, String nodeId, String name)
javax.ws.rs.core.Response
removeDependency(String fileSystemName, String nodeId, String name, String toNodeId)
javax.ws.rs.core.Response
renameNode(String fileSystemName, String nodeId, String name)
javax.ws.rs.core.Response
setConsistent(String fileSystemName, String nodeId)
javax.ws.rs.core.Response
setDescription(String fileSystemName, String nodeId, String description)
javax.ws.rs.core.Response
setMetadata(String fileSystemName, String nodeId, com.powsybl.afs.storage.NodeGenericMetadata nodeMetadata)
javax.ws.rs.core.Response
setParentNode(String fileSystemName, String nodeId, String newParentNodeId)
javax.ws.rs.core.Response
startTask(String fileSystemName, String projectFileId, String projectId, String name)
javax.ws.rs.core.Response
stopTask(String fileSystemName, UUID taskId)
javax.ws.rs.core.Response
takeSnapshot(String fileSystemName, String projectId)
javax.ws.rs.core.Response
timeSeriesExists(String fileSystemName, String nodeId, String timeSeriesName)
javax.ws.rs.core.Response
updateModificationTime(String fileSystemName, String nodeId)
javax.ws.rs.core.Response
updateTaskMessage(String fileSystemName, UUID taskId, String message)
javax.ws.rs.core.Response
writeBinaryData(String fileSystemName, String nodeId, String name, InputStream is)
-
-
-
Method Detail
-
getFileSystemNames
@GET @Produces("application/json") @Path("fileSystems") public javax.ws.rs.core.Response getFileSystemNames()
-
createRootNodeIfNotExists
@PUT @Produces("application/json") @Path("fileSystems/{fileSystemName}/rootNode") public javax.ws.rs.core.Response createRootNodeIfNotExists(@PathParam("fileSystemName") String fileSystemName, @QueryParam("nodeName") String nodeName, @QueryParam("nodePseudoClass") String nodePseudoClass)
-
check
@POST @Produces("application/json") @Path("fileSystems/{fileSystemName}/check") public javax.ws.rs.core.Response check(@PathParam("fileSystemName") String fileSystemName, @QueryParam("types") String types, @QueryParam("instant") Long instant, @QueryParam("repair") boolean repair)
-
getChildNodes
@GET @Produces("application/json") @Path("fileSystems/{fileSystemName}/nodes/{nodeId}/children") public javax.ws.rs.core.Response getChildNodes(@PathParam("fileSystemName") String fileSystemName, @PathParam("nodeId") String nodeId)
-
getInconsistentChildrenNodes
@GET @Produces("application/json") @Path("fileSystems/{fileSystemName}/inconsistentChildNodes") public javax.ws.rs.core.Response getInconsistentChildrenNodes(@PathParam("fileSystemName") String fileSystemName)
-
createNode
@POST @Consumes("application/json") @Produces("application/json") @Path("fileSystems/{fileSystemName}/nodes/{nodeId}/children/{childName}") public javax.ws.rs.core.Response createNode(@PathParam("fileSystemName") String fileSystemName, @PathParam("nodeId") String nodeId, @PathParam("childName") String childName, @QueryParam("description") String description, @QueryParam("nodePseudoClass") String nodePseudoClass, @QueryParam("version") int version, com.powsybl.afs.storage.NodeGenericMetadata nodeMetadata)
-
setMetadata
@PUT @Produces("application/json") @Path("fileSystems/{fileSystemName}/nodes/{nodeId}/metadata") public javax.ws.rs.core.Response setMetadata(@PathParam("fileSystemName") String fileSystemName, @PathParam("nodeId") String nodeId, com.powsybl.afs.storage.NodeGenericMetadata nodeMetadata)
-
getParentNode
@GET @Produces("application/json") @Path("fileSystems/{fileSystemName}/nodes/{nodeId}/parent") public javax.ws.rs.core.Response getParentNode(@PathParam("fileSystemName") String fileSystemName, @PathParam("nodeId") String nodeId)
-
getChildNode
@GET @Produces("application/json") @Path("fileSystems/{fileSystemName}/nodes/{nodeId}/children/{childName}") public javax.ws.rs.core.Response getChildNode(@PathParam("fileSystemName") String fileSystemName, @PathParam("nodeId") String nodeId, @PathParam("childName") String childName)
-
addDependency
@PUT @Produces("application/json") @Path("fileSystems/{fileSystemName}/nodes/{nodeId}/dependencies/{name}/{toNodeId}") public javax.ws.rs.core.Response addDependency(@PathParam("fileSystemName") String fileSystemName, @PathParam("nodeId") String nodeId, @PathParam("name") String name, @PathParam("toNodeId") String toNodeId)
-
getDependencies
@GET @Produces("application/json") @Path("fileSystems/{fileSystemName}/nodes/{nodeId}/dependencies/{name}") public javax.ws.rs.core.Response getDependencies(@PathParam("fileSystemName") String fileSystemName, @PathParam("nodeId") String nodeId, @PathParam("name") String name)
-
deleteNode
@DELETE @Produces("text/plain") @Path("fileSystems/{fileSystemName}/nodes/{nodeId}") public javax.ws.rs.core.Response deleteNode(@PathParam("fileSystemName") String fileSystemName, @PathParam("nodeId") String nodeId)
-
setDescription
@PUT @Consumes("text/plain") @Path("fileSystems/{fileSystemName}/nodes/{nodeId}/description") public javax.ws.rs.core.Response setDescription(@PathParam("fileSystemName") String fileSystemName, @PathParam("nodeId") String nodeId, String description)
-
setConsistent
@PUT @Consumes("application/json") @Path("fileSystems/{fileSystemName}/nodes/{nodeId}/consistent") public javax.ws.rs.core.Response setConsistent(@PathParam("fileSystemName") String fileSystemName, @PathParam("nodeId") String nodeId)
-
renameNode
@PUT @Consumes("text/plain") @Path("fileSystems/{fileSystemName}/nodes/{nodeId}/name") public javax.ws.rs.core.Response renameNode(@PathParam("fileSystemName") String fileSystemName, @PathParam("nodeId") String nodeId, String name)
-
updateModificationTime
@PUT @Path("fileSystems/{fileSystemName}/nodes/{nodeId}/modificationTime") public javax.ws.rs.core.Response updateModificationTime(@PathParam("fileSystemName") String fileSystemName, @PathParam("nodeId") String nodeId)
-
writeBinaryData
@PUT @Consumes("application/octet-stream") @Path("fileSystems/{fileSystemName}/nodes/{nodeId}/data/{name}") public javax.ws.rs.core.Response writeBinaryData(@PathParam("fileSystemName") String fileSystemName, @PathParam("nodeId") String nodeId, @PathParam("name") String name, InputStream is)
-
readBinaryAttribute
@GET @Produces("application/octet-stream") @Path("fileSystems/{fileSystemName}/nodes/{nodeId}/data/{name}") public javax.ws.rs.core.Response readBinaryAttribute(@PathParam("fileSystemName") String fileSystemName, @PathParam("nodeId") String nodeId, @PathParam("name") String name)
-
dataExists
@GET @Produces("text/plain") @Path("fileSystems/{fileSystemName}/nodes/{nodeId}/data/{name}") public javax.ws.rs.core.Response dataExists(@PathParam("fileSystemName") String fileSystemName, @PathParam("nodeId") String nodeId, @PathParam("name") String name)
-
getDataNames
@GET @Produces("application/json") @Path("fileSystems/{fileSystemName}/nodes/{nodeId}/data") public javax.ws.rs.core.Response getDataNames(@PathParam("fileSystemName") String fileSystemName, @PathParam("nodeId") String nodeId)
-
removeData
@DELETE @Produces("text/plain") @Path("fileSystems/{fileSystemName}/nodes/{nodeId}/data/{name}") public javax.ws.rs.core.Response removeData(@PathParam("fileSystemName") String fileSystemName, @PathParam("nodeId") String nodeId, @PathParam("name") String name)
-
setParentNode
@PUT @Consumes("text/plain") @Path("fileSystems/{fileSystemName}/nodes/{nodeId}/parent") public javax.ws.rs.core.Response setParentNode(@PathParam("fileSystemName") String fileSystemName, @PathParam("nodeId") String nodeId, String newParentNodeId)
-
isWritable
@GET @Produces("text/plain") @Path("fileSystems/{fileSystemName}/nodes/{nodeId}/writable") public javax.ws.rs.core.Response isWritable(@PathParam("fileSystemName") String fileSystemName, @PathParam("nodeId") String nodeId)
-
isConsistent
@GET @Produces("text/plain") @Path("fileSystems/{fileSystemName}/nodes/{nodeId}/consistent") public javax.ws.rs.core.Response isConsistent(@PathParam("fileSystemName") String fileSystemName, @PathParam("nodeId") String nodeId)
-
getDependencies
@GET @Produces("application/json") @Path("fileSystems/{fileSystemName}/nodes/{nodeId}/dependencies") public javax.ws.rs.core.Response getDependencies(@PathParam("fileSystemName") String fileSystemName, @PathParam("nodeId") String nodeId)
-
getBackwardDependencies
@GET @Produces("application/json") @Path("fileSystems/{fileSystemName}/nodes/{nodeId}/backwardDependencies") public javax.ws.rs.core.Response getBackwardDependencies(@PathParam("fileSystemName") String fileSystemName, @PathParam("nodeId") String nodeId)
-
removeDependency
@DELETE @Path("fileSystems/{fileSystemName}/nodes/{nodeId}/dependencies/{name}/{toNodeId}") public javax.ws.rs.core.Response removeDependency(@PathParam("fileSystemName") String fileSystemName, @PathParam("nodeId") String nodeId, @PathParam("name") String name, @PathParam("toNodeId") String toNodeId)
-
flush
@POST @Consumes("application/json") @Path("fileSystems/{fileSystemName}/flush") public javax.ws.rs.core.Response flush(@PathParam("fileSystemName") String fileSystemName, com.powsybl.afs.storage.buffer.StorageChangeSet changeSet)
-
createTimeSeries
@POST @Consumes("application/json") @Path("fileSystems/{fileSystemName}/nodes/{nodeId}/timeSeries") public javax.ws.rs.core.Response createTimeSeries(@PathParam("fileSystemName") String fileSystemName, @PathParam("nodeId") String nodeId, com.powsybl.timeseries.TimeSeriesMetadata metadata)
-
getTimeSeriesNames
@GET @Produces("application/json") @Path("fileSystems/{fileSystemName}/nodes/{nodeId}/timeSeries/name") public javax.ws.rs.core.Response getTimeSeriesNames(@PathParam("fileSystemName") String fileSystemName, @PathParam("nodeId") String nodeId)
-
timeSeriesExists
@GET @Produces("text/plain") @Path("fileSystems/{fileSystemName}/nodes/{nodeId}/timeSeries/{timeSeriesName}") public javax.ws.rs.core.Response timeSeriesExists(@PathParam("fileSystemName") String fileSystemName, @PathParam("nodeId") String nodeId, @PathParam("timeSeriesName") String timeSeriesName)
-
getTimeSeriesMetadata
@POST @Consumes("application/json") @Produces("application/json") @Path("fileSystems/{fileSystemName}/nodes/{nodeId}/timeSeries/metadata") public javax.ws.rs.core.Response getTimeSeriesMetadata(@PathParam("fileSystemName") String fileSystemName, @PathParam("nodeId") String nodeId, Set<String> timeSeriesNames)
-
getTimeSeriesDataVersions
@GET @Produces("application/json") @Path("fileSystems/{fileSystemName}/nodes/{nodeId}/timeSeries/versions") public javax.ws.rs.core.Response getTimeSeriesDataVersions(@PathParam("fileSystemName") String fileSystemName, @PathParam("nodeId") String nodeId)
-
getTimeSeriesDataVersions
@GET @Produces("application/json") @Path("fileSystems/{fileSystemName}/nodes/{nodeId}/timeSeries/{timeSeriesName}/versions") public javax.ws.rs.core.Response getTimeSeriesDataVersions(@PathParam("fileSystemName") String fileSystemName, @PathParam("nodeId") String nodeId, @PathParam("timeSeriesName") String timeSeriesName)
-
addDoubleTimeSeriesData
@POST @Consumes("application/json") @Path("fileSystems/{fileSystemName}/nodes/{nodeId}/timeSeries/double/{version}/{timeSeriesName}") public javax.ws.rs.core.Response addDoubleTimeSeriesData(@PathParam("fileSystemName") String fileSystemName, @PathParam("nodeId") String nodeId, @PathParam("version") int version, @PathParam("timeSeriesName") String timeSeriesName, List<com.powsybl.timeseries.DoubleDataChunk> chunks)
-
getDoubleTimeSeriesData
@POST @Consumes("application/json") @Produces("application/json") @Path("fileSystems/{fileSystemName}/nodes/{nodeId}/timeSeries/double/{version}") public javax.ws.rs.core.Response getDoubleTimeSeriesData(@PathParam("fileSystemName") String fileSystemName, @PathParam("nodeId") String nodeId, @PathParam("version") int version, Set<String> timeSeriesNames)
-
addStringTimeSeriesData
@POST @Consumes("application/octet-stream") @Path("fileSystems/{fileSystemName}/nodes/{nodeId}/timeSeries/string/{version}/{timeSeriesName}") public javax.ws.rs.core.Response addStringTimeSeriesData(@PathParam("fileSystemName") String fileSystemName, @PathParam("nodeId") String nodeId, @PathParam("version") int version, @PathParam("timeSeriesName") String timeSeriesName, List<com.powsybl.timeseries.StringDataChunk> chunks)
-
getStringTimeSeriesData
@POST @Consumes("application/json") @Produces("application/json") @Path("fileSystems/{fileSystemName}/nodes/{nodeId}/timeSeries/string/{version}") public javax.ws.rs.core.Response getStringTimeSeriesData(@PathParam("fileSystemName") String fileSystemName, @PathParam("nodeId") String nodeId, @PathParam("version") int version, Set<String> timeSeriesNames)
-
clearTimeSeries
@DELETE @Path("fileSystems/{fileSystemName}/nodes/{nodeId}/timeSeries") public javax.ws.rs.core.Response clearTimeSeries(@PathParam("fileSystemName") String fileSystemName, @PathParam("nodeId") String nodeId)
-
getNodeInfo
@GET @Produces("application/json") @Path("fileSystems/{fileSystemName}/nodes/{nodeId}") public javax.ws.rs.core.Response getNodeInfo(@PathParam("fileSystemName") String fileSystemName, @PathParam("nodeId") String nodeId)
-
startTask
@PUT @Produces("application/json") @Path("fileSystems/{fileSystemName}/tasks") public javax.ws.rs.core.Response startTask(@PathParam("fileSystemName") String fileSystemName, @QueryParam("projectFileId") String projectFileId, @QueryParam("projectId") String projectId, @QueryParam("name") String name)
-
stopTask
@DELETE @Path("fileSystems/{fileSystemName}/tasks/{taskId}") public javax.ws.rs.core.Response stopTask(@PathParam("fileSystemName") String fileSystemName, @PathParam("taskId") UUID taskId)
-
updateTaskMessage
@POST @Consumes("text/plain") @Path("fileSystems/{fileSystemName}/tasks/{taskId}") public javax.ws.rs.core.Response updateTaskMessage(@PathParam("fileSystemName") String fileSystemName, @PathParam("taskId") UUID taskId, String message)
-
takeSnapshot
@GET @Produces("application/json") @Path("fileSystems/{fileSystemName}/tasks") public javax.ws.rs.core.Response takeSnapshot(@PathParam("fileSystemName") String fileSystemName, @QueryParam("projectId") String projectId)
-
-