diff --git a/.classpath b/.classpath deleted file mode 100644 index 1e8fddb84..000000000 --- a/.classpath +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/.codecov.yml b/.codecov.yml index 42c0d62b4..b75b4f7a4 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -26,5 +26,4 @@ comment: require_changes: no ignore: - - "build" - "deployment" diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..00a51aff5 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,6 @@ +# +# https://help.github.com/articles/dealing-with-line-endings/ +# +# These are explicitly windows files and should use crlf +*.bat text eol=crlf + diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ca6fd710e..bb8baaba8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,17 +45,17 @@ jobs: fail-fast: false matrix: include: - - java: '11' + - java: '8' # needs to be compatible so jars can be used w/ java 8 mongo: 'mongodb-linux-x86_64-ubuntu2204-7.0.4' minio: '2019-05-23T00-29-34Z' wired_tiger: 'true' - ant_test: 'test_quick_coverage' + gradle_test: 'testQuick' # the current production setup - java: '11' mongo: 'mongodb-linux-x86_64-3.6.13' minio: '2019-05-23T00-29-34Z' wired_tiger: 'false' - ant_test: 'test_quick_coverage' + gradle_test: 'testQuick' steps: - uses: actions/checkout@v3 @@ -84,10 +84,6 @@ jobs: # move to parent dir of homedir to install binaries etc cd .. - # set up jars - git clone https://github.com/kbase/jars - export JARSDIR=$(pwd)/jars/lib/jars/ - # set up arango export ARANGODB_VER=3.9.1 export ARANGODB_V=39 @@ -142,7 +138,6 @@ jobs: sed -i "s#^test.mongo.exe.*#test.mongo.exe=$MONGOD#" test.cfg sed -i "s#^test.minio.exe.*#test.minio.exe=$MINIO#" test.cfg sed -i "s#^test.mongo.useWiredTiger.*#test.mongo.useWiredTiger=${{matrix.wired_tiger}}#" test.cfg - sed -i "s#^test.jars.dir.*#test.jars.dir=$JARSDIR#" test.cfg sed -i "s#^test.blobstore.exe.*#test.blobstore.exe=$BLOBEXE#" test.cfg sed -i "s#^test.handleservice.dir.*#test.handleservice.dir=$HSDIR#" test.cfg sed -i "s#^test.sampleservice.dir.*#test.sampleservice.dir=$SAMPLE_DIR#" test.cfg @@ -153,10 +148,10 @@ jobs: - name: Run tests shell: bash run: | - ant javadoc - ant ${{matrix.ant_test}} + ./gradlew ${{matrix.gradle_test}} - name: Upload coverage to Codecov uses: codecov/codecov-action@v3 with: + token: ${{ secrets.CODECOV_TOKEN }} fail_ci_if_error: true diff --git a/Dockerfile b/Dockerfile index 27a655ea8..6f1cd55d3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,29 @@ FROM eclipse-temurin:11-jdk as build -WORKDIR /tmp RUN apt update -y && \ - apt install -y ant git ca-certificates python3-sphinx && \ - git clone https://github.com/kbase/jars + apt install -y git ca-certificates python3-sphinx -COPY . /tmp/workspace_deluxe +WORKDIR /tmp/workspace -RUN cd workspace_deluxe && \ - make docker_deps +# dependencies take a while to D/L, so D/L & cache before the build so code changes don't cause +# a new D/L +# can't glob *gradle because of the .gradle dir +COPY gradlew settings.gradle /tmp/workspace/ +COPY gradle/ /tmp/workspace/gradle/ +RUN ./gradlew dependencies + +# Now build the code +COPY workspace.spec /tmp/workspace/workspace.spec +COPY deployment/ /tmp/workspace/deployment/ +COPY docshtml /tmp/workspace/docshtml/ +COPY docsource /tmp/workspace/docsource/ +COPY lib /tmp/workspace/lib/ +COPY service /tmp/workspace/service +COPY client /tmp/workspace/client +# for the git commit +COPY .git /tmp/workspace/.git/ +RUN ./gradlew war -# updated/slimmed down version of what's in kbase/kb_jre FROM ubuntu:18.04 # These ARGs values are passed in via the docker build command @@ -39,11 +52,11 @@ RUN mkdir -p /var/lib/apt/lists/partial && \ tar xvzf dockerize-${DOCKERIZE_VERSION}.tar.gz && \ rm dockerize-${DOCKERIZE_VERSION}.tar.gz -COPY --from=build /tmp/workspace_deluxe/deployment/ /kb/deployment/ +COPY --from=build /tmp/workspace/deployment/ /kb/deployment/ RUN /usr/bin/${TOMCAT_VERSION}-instance-create /kb/deployment/services/workspace/tomcat && \ - mv /kb/deployment/services/workspace/WorkspaceService.war /kb/deployment/services/workspace/tomcat/webapps/ROOT.war && \ rm -rf /kb/deployment/services/workspace/tomcat/webapps/ROOT +COPY --from=build /tmp/workspace/service/build/libs/service.war /kb/deployment/services/workspace/tomcat/webapps/ROOT.war # The BUILD_DATE value seem to bust the docker cache when the timestamp changes, move to # the end @@ -54,6 +67,9 @@ LABEL org.label-schema.build-date=$BUILD_DATE \ us.kbase.vcs-branch=$BRANCH \ maintainer="KBase developers engage@kbase.us" +# TODO BUILD update to no longer use dockerize and take env vars (e.g. like Collections). +# TODO BUILD Use subsections in the ini file / switch to TOML + EXPOSE 7058 ENTRYPOINT [ "/kb/deployment/bin/dockerize" ] WORKDIR /kb/deployment/services/workspace/tomcat diff --git a/Makefile b/Makefile deleted file mode 100644 index 17db74f06..000000000 --- a/Makefile +++ /dev/null @@ -1,132 +0,0 @@ -#port is now set in deploy.cfg -SERVICE = workspace -SERVICE_CAPS = Workspace -CLIENT_JAR = WorkspaceClient.jar -WAR = WorkspaceService.war -URL = https://kbase.us/services/ws/ - -#End of user defined variables -TARGET ?= /kb/deployment - -GITCOMMIT := $(shell git rev-parse --short HEAD) -#TODO use --points-at when git 1.7.10 available -TAGS := $(shell git tag --contains $(GITCOMMIT)) - -DEPLOY_RUNTIME ?= /kb/runtime -JAVA_HOME ?= $(DEPLOY_RUNTIME)/java -SERVICE_DIR ?= $(TARGET)/services/$(SERVICE) -GLASSFISH_HOME ?= $(DEPLOY_RUNTIME)/glassfish3 -SERVICE_USER ?= kbase - -ASADMIN = $(GLASSFISH_HOME)/glassfish/bin/asadmin - -ANT = ant - -# make sure our make test works -.PHONY : test - -default: build-libs build-docs - -build-libs: - @#TODO at some point make dependent on compile - checked in for now. - $(ANT) compile - -build-docs: - -rm -r docs - $(ANT) javadoc - pod2html --infile=lib/Bio/KBase/$(SERVICE)/Client.pm --outfile=docs/$(SERVICE)_perl.html - rm -f pod2htm?.tmp - sphinx-build docsource/ docs - cp $(SERVICE).spec docs/. - cp docshtml/* docs/. - -docker_deps: build-libs build-docs - $(ANT) buildwar - # cp server_scripts/glassfish_administer_service.py deployment/bin - # chmod 755 deployment/bin/glassfish_administer_service.py - mkdir -p deployment/services/workspace/ - cp dist/$(WAR) deployment/services/workspace/ - -compile: compile-typespec compile-typespec-java compile-html - -compile-html: - kb-sdk compile --html --out docshtml $(SERVICE).spec - -compile-typespec-java: - kb-sdk compile --java --javasrc src --javasrv --out . \ - --url $(URL) $(SERVICE).spec - -compile-typespec: - kb-sdk compile \ - --out lib \ - --jsclname javascript/$(SERVICE)/Client \ - --plclname Bio::KBase::$(SERVICE)::Client \ - --pyclname biokbase.$(SERVICE).client \ - --url $(URL) \ - $(SERVICE).spec - rm lib/biokbase/workspace/authclient.py - -test: test-service - -test-service: - $(ANT) test - -test-quick: - $(ANT) test_quick - -deploy: deploy-client deploy-service - -deploy-client: deploy-client-libs deploy-docs - -deploy-client-libs: - mkdir -p $(TARGET)/lib/ - cp dist/client/$(CLIENT_JAR) $(TARGET)/lib/ - cp -rv lib/* $(TARGET)/lib/ - echo $(GITCOMMIT) > $(TARGET)/lib/$(SERVICE).clientdist - echo $(TAGS) >> $(TARGET)/lib/$(SERVICE).clientdist - -deploy-docs: - mkdir -p $(SERVICE_DIR)/webroot - cp -r docs/* $(SERVICE_DIR)/webroot/. - -deploy-service: deploy-service-libs deploy-service-scripts - -deploy-service-libs: - $(ANT) buildwar - mkdir -p $(SERVICE_DIR) - cp dist/$(WAR) $(SERVICE_DIR) - echo $(GITCOMMIT) > $(SERVICE_DIR)/$(SERVICE).serverdist - echo $(TAGS) >> $(SERVICE_DIR)/$(SERVICE).serverdist - -deploy-service-scripts: - cp server_scripts/glassfish_administer_service.py $(SERVICE_DIR) - server_scripts/build_server_control_scripts.py $(SERVICE_DIR) $(WAR)\ - $(TARGET) $(JAVA_HOME) deploy.cfg $(ASADMIN) $(SERVICE_CAPS) - -deploy-upstart: - echo "# $(SERVICE) service" > /etc/init/$(SERVICE).conf - echo "# NOTE: stop $(SERVICE) does not work" >> /etc/init/$(SERVICE).conf - echo "# Use the standard stop_service script as the $(SERVICE_USER) user" >> /etc/init/$(SERVICE).conf - echo "#" >> /etc/init/$(SERVICE).conf - echo "# Make sure to set up the $(SERVICE_USER) user account" >> /etc/init/$(SERVICE).conf - echo "# shell> groupadd kbase" >> /etc/init/$(SERVICE).conf - echo "# shell> useradd -r -g $(SERVICE_USER) $(SERVICE_USER)" >> /etc/init/$(SERVICE).conf - echo "#" >> /etc/init/$(SERVICE).conf - echo "start on runlevel [23] and started shock" >> /etc/init/$(SERVICE).conf - echo "stop on runlevel [!23]" >> /etc/init/$(SERVICE).conf - echo "pre-start exec chown -R $(SERVICE_USER) $(TARGET)/services/$(SERVICE)" >> /etc/init/$(SERVICE).conf - echo "exec su kbase -c '$(TARGET)/services/$(SERVICE)/start_service'" >> /etc/init/$(SERVICE).conf - -undeploy: - -rm -rf $(SERVICE_DIR) - -rm -rfv $(TARGET)/lib/Bio/KBase/$(SERVICE) - -rm -rfv $(TARGET)/lib/biokbase/$(SERVICE) - -rm -rfv $(TARGET)/lib/javascript/$(SERVICE) - -rm -rfv $(TARGET)/lib/$(CLIENT_JAR) - -clean: - $(ANT) clean - -rm -rf docs - -rm -rf bin - -rm -rf deployment/services/workspace/* - @#TODO remove lib once files are generated on the fly diff --git a/build.xml b/build.xml deleted file mode 100644 index 5b3af13f7..000000000 --- a/build.xml +++ /dev/null @@ -1,355 +0,0 @@ - - - - Build file for the Workspace Service - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #!/bin/sh -java -cp ${dist}/${jar.file}:${lib.classpath} us.kbase.workspace.kbase.SchemaUpdaterCLI $@ - - - - - - - - - - - diff --git a/client/build.gradle b/client/build.gradle new file mode 100644 index 000000000..3b61f6926 --- /dev/null +++ b/client/build.gradle @@ -0,0 +1,118 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +// TODO TEST switch to Kotlin DSL which is now the default and apparently better +// TODO TEST avoid early configuration, see +// https://docs.gradle.org/current/userguide/task_configuration_avoidance.html +// need to avoid withType as well apparently? + +plugins { + id 'java' + id 'maven-publish' +} + +group = 'com.github.kbase' + +var VER_JAVA_COMMON = "0.3.0" +var VER_AUTH2_CLIENT = "0.5.0" + + +var DEFAULT_URL = "https://ci.kbase.us/services/ws" + +var LOC_WS_SPEC = "$rootDir/workspace.spec" + +repositories { + mavenCentral() + maven { + name = "Jitpack" + url = 'https://jitpack.io' + } +} + +compileJava { + // build needs to be java 8 compatible so jars can be used in java 8 projects + // TODO BUILD remove when we no longer support java 8, use `options.release = 11` if needed + java.sourceCompatibility = JavaVersion.VERSION_1_8 + java.targetCompatibility = JavaVersion.VERSION_1_8 +} + +java { + withSourcesJar() + withJavadocJar() +} + +javadoc { + /* TODO DOCS the current sdk documentation looks like invalid html to javadoc + * need to go through and remove + * also some spots with < / > that need to be wrapped with {@code } in internal code + */ + failOnError = false + options { + links "https://docs.oracle.com/en/java/javase/11/docs/api/" + links "https://javadoc.jitpack.io/com/github/kbase/auth2_client_java/$VER_AUTH2_CLIENT/javadoc/" + links "https://javadoc.jitpack.io/com/github/kbase/java_common/$VER_JAVA_COMMON/javadoc/" + } +} + +/* SDK compile notes: + * kb-sdk starts a docker container in interactive mode. Gradle's commandLine doesn't allocate + * a tty so the command fails. + * I tried using a ProcessBuilder and + * https://docs.oracle.com/en%2Fjava%2Fjavase%2F11%2Fdocs%2Fapi%2F%2F/java.base/java/lang/ProcessBuilder.html#inheritIO() + * but that failed also with no useful output. + * + * The current solution is to precede the kb-sdk call with a script call, which either + * allocates a tty or fools kb-sdk into thinking there is one - not quite sure. + * https://man7.org/linux/man-pages/man1/script.1.html + * I tried to redirect the script log file to /dev/null with -O and --log-out but script didn't + * recognize either option, hence the delete. + * + * This is, generally speaking, a janky mess and if someone can find a better way to do this + * that'd be fantastic. + */ + +var LOC_SCRIPT_TYPESCRIPT = "./typescript" + +task sdkCompileJava { + // TODO GRADLE is there a variable for src/main/java? + var cmd = "kb-sdk compile " + + "--java " + + "--javasrc ${project.projectDir}/src/main/java/ " + + "--out . " + + "--url $DEFAULT_URL " + + LOC_WS_SPEC + doLast { + exec { + commandLine "script", "-qefc", cmd + } + delete LOC_SCRIPT_TYPESCRIPT + } +} + +task sdkCompile { + dependsOn sdkCompileJava +} + +task buildAll { + dependsOn jar +} + +publishing { + publications { + maven(MavenPublication) { + from components.java + artifactId = "workspace-client" + } + } +} + +dependencies { + // using older dependencies to not force upgrades on services that might not be able to + // handle them. Need to upgrade the services and then upgrade here + implementation "com.fasterxml.jackson.core:jackson-annotations:2.5.4" + implementation "com.fasterxml.jackson.core:jackson-databind:2.5.4" + implementation "com.github.kbase:auth2_client_java:$VER_AUTH2_CLIENT" + implementation "com.github.kbase:java_common:$VER_JAVA_COMMON" + implementation 'javax.annotation:javax.annotation-api:1.3.2' +} diff --git a/src/us/kbase/common/service/Tuple11.java b/client/src/main/java/us/kbase/common/service/Tuple11.java similarity index 100% rename from src/us/kbase/common/service/Tuple11.java rename to client/src/main/java/us/kbase/common/service/Tuple11.java diff --git a/src/us/kbase/common/service/Tuple12.java b/client/src/main/java/us/kbase/common/service/Tuple12.java similarity index 100% rename from src/us/kbase/common/service/Tuple12.java rename to client/src/main/java/us/kbase/common/service/Tuple12.java diff --git a/src/us/kbase/common/service/Tuple7.java b/client/src/main/java/us/kbase/common/service/Tuple7.java similarity index 100% rename from src/us/kbase/common/service/Tuple7.java rename to client/src/main/java/us/kbase/common/service/Tuple7.java diff --git a/src/us/kbase/common/service/Tuple9.java b/client/src/main/java/us/kbase/common/service/Tuple9.java similarity index 100% rename from src/us/kbase/common/service/Tuple9.java rename to client/src/main/java/us/kbase/common/service/Tuple9.java diff --git a/src/us/kbase/workspace/AlterAdminObjectMetadataParams.java b/client/src/main/java/us/kbase/workspace/AlterAdminObjectMetadataParams.java similarity index 100% rename from src/us/kbase/workspace/AlterAdminObjectMetadataParams.java rename to client/src/main/java/us/kbase/workspace/AlterAdminObjectMetadataParams.java diff --git a/src/us/kbase/workspace/AlterWorkspaceMetadataParams.java b/client/src/main/java/us/kbase/workspace/AlterWorkspaceMetadataParams.java similarity index 100% rename from src/us/kbase/workspace/AlterWorkspaceMetadataParams.java rename to client/src/main/java/us/kbase/workspace/AlterWorkspaceMetadataParams.java diff --git a/src/us/kbase/workspace/CloneWorkspaceParams.java b/client/src/main/java/us/kbase/workspace/CloneWorkspaceParams.java similarity index 100% rename from src/us/kbase/workspace/CloneWorkspaceParams.java rename to client/src/main/java/us/kbase/workspace/CloneWorkspaceParams.java diff --git a/src/us/kbase/workspace/CopyObjectParams.java b/client/src/main/java/us/kbase/workspace/CopyObjectParams.java similarity index 100% rename from src/us/kbase/workspace/CopyObjectParams.java rename to client/src/main/java/us/kbase/workspace/CopyObjectParams.java diff --git a/src/us/kbase/workspace/CreateWorkspaceParams.java b/client/src/main/java/us/kbase/workspace/CreateWorkspaceParams.java similarity index 100% rename from src/us/kbase/workspace/CreateWorkspaceParams.java rename to client/src/main/java/us/kbase/workspace/CreateWorkspaceParams.java diff --git a/src/us/kbase/workspace/ExternalDataUnit.java b/client/src/main/java/us/kbase/workspace/ExternalDataUnit.java similarity index 100% rename from src/us/kbase/workspace/ExternalDataUnit.java rename to client/src/main/java/us/kbase/workspace/ExternalDataUnit.java diff --git a/src/us/kbase/workspace/FuncInfo.java b/client/src/main/java/us/kbase/workspace/FuncInfo.java similarity index 100% rename from src/us/kbase/workspace/FuncInfo.java rename to client/src/main/java/us/kbase/workspace/FuncInfo.java diff --git a/src/us/kbase/workspace/GetAdminRoleResults.java b/client/src/main/java/us/kbase/workspace/GetAdminRoleResults.java similarity index 100% rename from src/us/kbase/workspace/GetAdminRoleResults.java rename to client/src/main/java/us/kbase/workspace/GetAdminRoleResults.java diff --git a/src/us/kbase/workspace/GetModuleInfoParams.java b/client/src/main/java/us/kbase/workspace/GetModuleInfoParams.java similarity index 100% rename from src/us/kbase/workspace/GetModuleInfoParams.java rename to client/src/main/java/us/kbase/workspace/GetModuleInfoParams.java diff --git a/src/us/kbase/workspace/GetNamesByPrefixParams.java b/client/src/main/java/us/kbase/workspace/GetNamesByPrefixParams.java similarity index 100% rename from src/us/kbase/workspace/GetNamesByPrefixParams.java rename to client/src/main/java/us/kbase/workspace/GetNamesByPrefixParams.java diff --git a/src/us/kbase/workspace/GetNamesByPrefixResults.java b/client/src/main/java/us/kbase/workspace/GetNamesByPrefixResults.java similarity index 100% rename from src/us/kbase/workspace/GetNamesByPrefixResults.java rename to client/src/main/java/us/kbase/workspace/GetNamesByPrefixResults.java diff --git a/src/us/kbase/workspace/GetObjectInfo3Params.java b/client/src/main/java/us/kbase/workspace/GetObjectInfo3Params.java similarity index 100% rename from src/us/kbase/workspace/GetObjectInfo3Params.java rename to client/src/main/java/us/kbase/workspace/GetObjectInfo3Params.java diff --git a/src/us/kbase/workspace/GetObjectInfo3Results.java b/client/src/main/java/us/kbase/workspace/GetObjectInfo3Results.java similarity index 100% rename from src/us/kbase/workspace/GetObjectInfo3Results.java rename to client/src/main/java/us/kbase/workspace/GetObjectInfo3Results.java diff --git a/src/us/kbase/workspace/GetObjectInfoNewParams.java b/client/src/main/java/us/kbase/workspace/GetObjectInfoNewParams.java similarity index 100% rename from src/us/kbase/workspace/GetObjectInfoNewParams.java rename to client/src/main/java/us/kbase/workspace/GetObjectInfoNewParams.java diff --git a/src/us/kbase/workspace/GetObjectOutput.java b/client/src/main/java/us/kbase/workspace/GetObjectOutput.java similarity index 98% rename from src/us/kbase/workspace/GetObjectOutput.java rename to client/src/main/java/us/kbase/workspace/GetObjectOutput.java index 177e3c334..06f5a0324 100644 --- a/src/us/kbase/workspace/GetObjectOutput.java +++ b/client/src/main/java/us/kbase/workspace/GetObjectOutput.java @@ -20,7 +20,7 @@ * compatibility. * UnspecifiedObject data - The object's data. * object_metadata metadata - Metadata for object retrieved/ - * @deprecated Workspaces.ObjectData + * @deprecated Workspace.ObjectData * * */ diff --git a/src/us/kbase/workspace/GetObjectParams.java b/client/src/main/java/us/kbase/workspace/GetObjectParams.java similarity index 100% rename from src/us/kbase/workspace/GetObjectParams.java rename to client/src/main/java/us/kbase/workspace/GetObjectParams.java diff --git a/src/us/kbase/workspace/GetObjectmetaParams.java b/client/src/main/java/us/kbase/workspace/GetObjectmetaParams.java similarity index 100% rename from src/us/kbase/workspace/GetObjectmetaParams.java rename to client/src/main/java/us/kbase/workspace/GetObjectmetaParams.java diff --git a/src/us/kbase/workspace/GetObjects2Params.java b/client/src/main/java/us/kbase/workspace/GetObjects2Params.java similarity index 100% rename from src/us/kbase/workspace/GetObjects2Params.java rename to client/src/main/java/us/kbase/workspace/GetObjects2Params.java diff --git a/src/us/kbase/workspace/GetObjects2Results.java b/client/src/main/java/us/kbase/workspace/GetObjects2Results.java similarity index 100% rename from src/us/kbase/workspace/GetObjects2Results.java rename to client/src/main/java/us/kbase/workspace/GetObjects2Results.java diff --git a/src/us/kbase/workspace/GetPermissionsMassParams.java b/client/src/main/java/us/kbase/workspace/GetPermissionsMassParams.java similarity index 100% rename from src/us/kbase/workspace/GetPermissionsMassParams.java rename to client/src/main/java/us/kbase/workspace/GetPermissionsMassParams.java diff --git a/src/us/kbase/workspace/GetWorkspacemetaParams.java b/client/src/main/java/us/kbase/workspace/GetWorkspacemetaParams.java similarity index 100% rename from src/us/kbase/workspace/GetWorkspacemetaParams.java rename to client/src/main/java/us/kbase/workspace/GetWorkspacemetaParams.java diff --git a/src/us/kbase/workspace/GrantModuleOwnershipParams.java b/client/src/main/java/us/kbase/workspace/GrantModuleOwnershipParams.java similarity index 100% rename from src/us/kbase/workspace/GrantModuleOwnershipParams.java rename to client/src/main/java/us/kbase/workspace/GrantModuleOwnershipParams.java diff --git a/src/us/kbase/workspace/ListAllTypesParams.java b/client/src/main/java/us/kbase/workspace/ListAllTypesParams.java similarity index 100% rename from src/us/kbase/workspace/ListAllTypesParams.java rename to client/src/main/java/us/kbase/workspace/ListAllTypesParams.java diff --git a/src/us/kbase/workspace/ListModuleVersionsParams.java b/client/src/main/java/us/kbase/workspace/ListModuleVersionsParams.java similarity index 100% rename from src/us/kbase/workspace/ListModuleVersionsParams.java rename to client/src/main/java/us/kbase/workspace/ListModuleVersionsParams.java diff --git a/src/us/kbase/workspace/ListModulesParams.java b/client/src/main/java/us/kbase/workspace/ListModulesParams.java similarity index 100% rename from src/us/kbase/workspace/ListModulesParams.java rename to client/src/main/java/us/kbase/workspace/ListModulesParams.java diff --git a/src/us/kbase/workspace/ListObjectsParams.java b/client/src/main/java/us/kbase/workspace/ListObjectsParams.java similarity index 100% rename from src/us/kbase/workspace/ListObjectsParams.java rename to client/src/main/java/us/kbase/workspace/ListObjectsParams.java diff --git a/src/us/kbase/workspace/ListWorkspaceIDsParams.java b/client/src/main/java/us/kbase/workspace/ListWorkspaceIDsParams.java similarity index 100% rename from src/us/kbase/workspace/ListWorkspaceIDsParams.java rename to client/src/main/java/us/kbase/workspace/ListWorkspaceIDsParams.java diff --git a/src/us/kbase/workspace/ListWorkspaceIDsResults.java b/client/src/main/java/us/kbase/workspace/ListWorkspaceIDsResults.java similarity index 100% rename from src/us/kbase/workspace/ListWorkspaceIDsResults.java rename to client/src/main/java/us/kbase/workspace/ListWorkspaceIDsResults.java diff --git a/src/us/kbase/workspace/ListWorkspaceInfoParams.java b/client/src/main/java/us/kbase/workspace/ListWorkspaceInfoParams.java similarity index 100% rename from src/us/kbase/workspace/ListWorkspaceInfoParams.java rename to client/src/main/java/us/kbase/workspace/ListWorkspaceInfoParams.java diff --git a/src/us/kbase/workspace/ListWorkspaceObjectsParams.java b/client/src/main/java/us/kbase/workspace/ListWorkspaceObjectsParams.java similarity index 100% rename from src/us/kbase/workspace/ListWorkspaceObjectsParams.java rename to client/src/main/java/us/kbase/workspace/ListWorkspaceObjectsParams.java diff --git a/src/us/kbase/workspace/ListWorkspacesParams.java b/client/src/main/java/us/kbase/workspace/ListWorkspacesParams.java similarity index 100% rename from src/us/kbase/workspace/ListWorkspacesParams.java rename to client/src/main/java/us/kbase/workspace/ListWorkspacesParams.java diff --git a/src/us/kbase/workspace/ModuleInfo.java b/client/src/main/java/us/kbase/workspace/ModuleInfo.java similarity index 100% rename from src/us/kbase/workspace/ModuleInfo.java rename to client/src/main/java/us/kbase/workspace/ModuleInfo.java diff --git a/src/us/kbase/workspace/ModuleVersions.java b/client/src/main/java/us/kbase/workspace/ModuleVersions.java similarity index 100% rename from src/us/kbase/workspace/ModuleVersions.java rename to client/src/main/java/us/kbase/workspace/ModuleVersions.java diff --git a/src/us/kbase/workspace/ObjectData.java b/client/src/main/java/us/kbase/workspace/ObjectData.java similarity index 100% rename from src/us/kbase/workspace/ObjectData.java rename to client/src/main/java/us/kbase/workspace/ObjectData.java diff --git a/src/us/kbase/workspace/ObjectIdentity.java b/client/src/main/java/us/kbase/workspace/ObjectIdentity.java similarity index 100% rename from src/us/kbase/workspace/ObjectIdentity.java rename to client/src/main/java/us/kbase/workspace/ObjectIdentity.java diff --git a/src/us/kbase/workspace/ObjectInfo.java b/client/src/main/java/us/kbase/workspace/ObjectInfo.java similarity index 100% rename from src/us/kbase/workspace/ObjectInfo.java rename to client/src/main/java/us/kbase/workspace/ObjectInfo.java diff --git a/src/us/kbase/workspace/ObjectMetadataUpdate.java b/client/src/main/java/us/kbase/workspace/ObjectMetadataUpdate.java similarity index 100% rename from src/us/kbase/workspace/ObjectMetadataUpdate.java rename to client/src/main/java/us/kbase/workspace/ObjectMetadataUpdate.java diff --git a/src/us/kbase/workspace/ObjectProvenanceInfo.java b/client/src/main/java/us/kbase/workspace/ObjectProvenanceInfo.java similarity index 100% rename from src/us/kbase/workspace/ObjectProvenanceInfo.java rename to client/src/main/java/us/kbase/workspace/ObjectProvenanceInfo.java diff --git a/src/us/kbase/workspace/ObjectSaveData.java b/client/src/main/java/us/kbase/workspace/ObjectSaveData.java similarity index 100% rename from src/us/kbase/workspace/ObjectSaveData.java rename to client/src/main/java/us/kbase/workspace/ObjectSaveData.java diff --git a/src/us/kbase/workspace/ObjectSpecification.java b/client/src/main/java/us/kbase/workspace/ObjectSpecification.java similarity index 100% rename from src/us/kbase/workspace/ObjectSpecification.java rename to client/src/main/java/us/kbase/workspace/ObjectSpecification.java diff --git a/src/us/kbase/workspace/ProvenanceAction.java b/client/src/main/java/us/kbase/workspace/ProvenanceAction.java similarity index 100% rename from src/us/kbase/workspace/ProvenanceAction.java rename to client/src/main/java/us/kbase/workspace/ProvenanceAction.java diff --git a/src/us/kbase/workspace/RegisterTypespecCopyParams.java b/client/src/main/java/us/kbase/workspace/RegisterTypespecCopyParams.java similarity index 100% rename from src/us/kbase/workspace/RegisterTypespecCopyParams.java rename to client/src/main/java/us/kbase/workspace/RegisterTypespecCopyParams.java diff --git a/src/us/kbase/workspace/RegisterTypespecParams.java b/client/src/main/java/us/kbase/workspace/RegisterTypespecParams.java similarity index 100% rename from src/us/kbase/workspace/RegisterTypespecParams.java rename to client/src/main/java/us/kbase/workspace/RegisterTypespecParams.java diff --git a/src/us/kbase/workspace/RemoveModuleOwnershipParams.java b/client/src/main/java/us/kbase/workspace/RemoveModuleOwnershipParams.java similarity index 100% rename from src/us/kbase/workspace/RemoveModuleOwnershipParams.java rename to client/src/main/java/us/kbase/workspace/RemoveModuleOwnershipParams.java diff --git a/src/us/kbase/workspace/RenameObjectParams.java b/client/src/main/java/us/kbase/workspace/RenameObjectParams.java similarity index 100% rename from src/us/kbase/workspace/RenameObjectParams.java rename to client/src/main/java/us/kbase/workspace/RenameObjectParams.java diff --git a/src/us/kbase/workspace/RenameWorkspaceParams.java b/client/src/main/java/us/kbase/workspace/RenameWorkspaceParams.java similarity index 100% rename from src/us/kbase/workspace/RenameWorkspaceParams.java rename to client/src/main/java/us/kbase/workspace/RenameWorkspaceParams.java diff --git a/src/us/kbase/workspace/SaveObjectParams.java b/client/src/main/java/us/kbase/workspace/SaveObjectParams.java similarity index 100% rename from src/us/kbase/workspace/SaveObjectParams.java rename to client/src/main/java/us/kbase/workspace/SaveObjectParams.java diff --git a/src/us/kbase/workspace/SaveObjectsParams.java b/client/src/main/java/us/kbase/workspace/SaveObjectsParams.java similarity index 100% rename from src/us/kbase/workspace/SaveObjectsParams.java rename to client/src/main/java/us/kbase/workspace/SaveObjectsParams.java diff --git a/src/us/kbase/workspace/SetGlobalPermissionsParams.java b/client/src/main/java/us/kbase/workspace/SetGlobalPermissionsParams.java similarity index 100% rename from src/us/kbase/workspace/SetGlobalPermissionsParams.java rename to client/src/main/java/us/kbase/workspace/SetGlobalPermissionsParams.java diff --git a/src/us/kbase/workspace/SetPermissionsParams.java b/client/src/main/java/us/kbase/workspace/SetPermissionsParams.java similarity index 100% rename from src/us/kbase/workspace/SetPermissionsParams.java rename to client/src/main/java/us/kbase/workspace/SetPermissionsParams.java diff --git a/src/us/kbase/workspace/SetWorkspaceDescriptionParams.java b/client/src/main/java/us/kbase/workspace/SetWorkspaceDescriptionParams.java similarity index 100% rename from src/us/kbase/workspace/SetWorkspaceDescriptionParams.java rename to client/src/main/java/us/kbase/workspace/SetWorkspaceDescriptionParams.java diff --git a/src/us/kbase/workspace/SubAction.java b/client/src/main/java/us/kbase/workspace/SubAction.java similarity index 100% rename from src/us/kbase/workspace/SubAction.java rename to client/src/main/java/us/kbase/workspace/SubAction.java diff --git a/src/us/kbase/workspace/SubObjectIdentity.java b/client/src/main/java/us/kbase/workspace/SubObjectIdentity.java similarity index 100% rename from src/us/kbase/workspace/SubObjectIdentity.java rename to client/src/main/java/us/kbase/workspace/SubObjectIdentity.java diff --git a/src/us/kbase/workspace/TypeInfo.java b/client/src/main/java/us/kbase/workspace/TypeInfo.java similarity index 100% rename from src/us/kbase/workspace/TypeInfo.java rename to client/src/main/java/us/kbase/workspace/TypeInfo.java diff --git a/src/us/kbase/workspace/WorkspaceClient.java b/client/src/main/java/us/kbase/workspace/WorkspaceClient.java similarity index 99% rename from src/us/kbase/workspace/WorkspaceClient.java rename to client/src/main/java/us/kbase/workspace/WorkspaceClient.java index dfb672bcb..cd462c68b 100644 --- a/src/us/kbase/workspace/WorkspaceClient.java +++ b/client/src/main/java/us/kbase/workspace/WorkspaceClient.java @@ -42,7 +42,7 @@ public class WorkspaceClient { private static URL DEFAULT_URL = null; static { try { - DEFAULT_URL = new URL("https://kbase.us/services/ws/"); + DEFAULT_URL = new URL("https://ci.kbase.us/services/ws"); } catch (MalformedURLException mue) { throw new RuntimeException("Compile error in client - bad url compiled"); } diff --git a/src/us/kbase/workspace/WorkspaceIdentity.java b/client/src/main/java/us/kbase/workspace/WorkspaceIdentity.java similarity index 100% rename from src/us/kbase/workspace/WorkspaceIdentity.java rename to client/src/main/java/us/kbase/workspace/WorkspaceIdentity.java diff --git a/src/us/kbase/workspace/WorkspacePermissions.java b/client/src/main/java/us/kbase/workspace/WorkspacePermissions.java similarity index 100% rename from src/us/kbase/workspace/WorkspacePermissions.java rename to client/src/main/java/us/kbase/workspace/WorkspacePermissions.java diff --git a/docshtml/Workspace.html b/docshtml/Workspace.html index d66311dfb..ec64532bb 100644 --- a/docshtml/Workspace.html +++ b/docshtml/Workspace.html @@ -1 +1 @@ -Workspace
/*
*The Workspace Service (WSS) is primarily a language independent remote storage
*and retrieval system for KBase typed objects (TO) defined with the KBase
*Interface Description Language (KIDL). It has the following primary features:
*- Immutable storage of TOs with
*- user defined metadata
*- data provenance
*- Versioning of TOs
*- Referencing from TO to TO
*- Typechecking of all saved objects against a KIDL specification
*- Collecting typed objects into a workspace
*- Sharing workspaces with specific KBase users or the world
*- Freezing and publishing workspaces
*/
moduleWorkspace{

/*
*A boolean. 0 = false, other = true.
*/
typedefintboolean;

/*
*The unique, permanent numerical ID of a workspace.
*/
typedefintws_id;

/*
*A string used as a name for a workspace.
*Any string consisting of alphanumeric characters and "_", ".", or "-"
*that is not an integer is acceptable. The name may optionally be
*prefixed with the workspace owner's user name and a colon, e.g.
*kbasetest:my_workspace.
*/
typedefstringws_name;

/*
*Represents the permissions a user or users have to a workspace:
*
*'a' - administrator. All operations allowed.
*'w' - read/write.
*'r' - read.
*'n' - no permissions.
*/
typedefstringpermission;

/*
*Login name of a KBase user account.
*/
typedefstringusername;

/*
*A time in the format YYYY-MM-DDThh:mm:ssZ, where Z is either the
*character Z (representing the UTC timezone) or the difference
*in time to UTC in the format +/-HHMM, eg:
*2012-12-17T23:24:06-0500 (EST time)
*2013-04-03T08:56:32+0000 (UTC time)
*2013-04-03T08:56:32Z (UTC time)
*/
typedefstringtimestamp;

/*
*A Unix epoch (the time since 00:00:00 1/1/1970 UTC) in milliseconds.
*/
typedefintepoch;

/*
*A type string.
*Specifies the type and its version in a single string in the format
*[module].[typename]-[major].[minor]:
*
*module - a string. The module name of the typespec containing the type.
*typename - a string. The name of the type as assigned by the typedef
*statement.
*major - an integer. The major version of the type. A change in the
*major version implies the type has changed in a non-backwards
*compatible way.
*minor - an integer. The minor version of the type. A change in the
*minor version implies that the type has changed in a way that is
*backwards compatible with previous type definitions.
*
*In many cases, the major and minor versions are optional, and if not
*provided the most recent version will be used.
*
*Example: MyModule.MyType-3.1
*/
typedefstringtype_string;

/*
*An id type (e.g. from a typespec @id annotation: @id [idtype])
*/
typedefstringid_type;

/*
*An id extracted from an object.
*/
typedefstringextracted_id;

/*
*User provided metadata about an object.
*Arbitrary key-value pairs provided by the user.
*/
typedefmapping<string,string>usermeta;

/*
*The lock status of a workspace.
*One of 'unlocked', 'locked', or 'published'.
*/
typedefstringlock_status;

/*
*A workspace identifier.
*
*Select a workspace by one, and only one, of the numerical id or name.
*ws_id id - the numerical ID of the workspace.
*ws_name workspace - the name of the workspace.
*/
typedefstructure{
ws_nameworkspace;
ws_idid;
}
WorkspaceIdentity;

/*
*Meta data associated with a workspace. Provided for backwards
*compatibility. To be replaced by workspace_info.
*
*ws_name id - name of the workspace
*username owner - name of the user who owns (who created) this workspace
*timestamp moddate - date when the workspace was last modified
*int objects - the approximate number of objects currently stored in
*the workspace.
*permission user_permission - permissions for the currently logged in
*user for the workspace
*permission global_permission - default permissions for the workspace
*for all KBase users
*ws_id num_id - numerical ID of the workspace
*
*@deprecatedWorkspace.workspace_info
*/
typedeftuple<ws_nameid,usernameowner,timestampmoddate,intobjects,permissionuser_permission,permissionglobal_permission,ws_idnum_id>workspace_metadata;

/*
*Information about a workspace.
*
*ws_id id - the numerical ID of the workspace.
*ws_name workspace - name of the workspace.
*username owner - name of the user who owns (e.g. created) this workspace.
*timestamp moddate - date when the workspace was last modified.
*int max_objid - the maximum object ID appearing in this workspace.
*Since cloning a workspace preserves object IDs, this number may be
*greater than the number of objects in a newly cloned workspace.
*permission user_permission - permissions for the authenticated user of
*this workspace.
*permission globalread - whether this workspace is globally readable.
*lock_status lockstat - the status of the workspace lock.
*usermeta metadata - arbitrary user-supplied metadata about
*the workspace.
*/
typedeftuple<ws_idid,ws_nameworkspace,usernameowner,timestampmoddate,intmax_objid,permissionuser_permission,permissionglobalread,lock_statuslockstat,usermetametadata>workspace_info;

/*
*The unique, permanent numerical ID of an object.
*/
typedefintobj_id;

/*
*A string used as a name for an object.
*Any string consisting of alphanumeric characters and the characters
*|._- that is not an integer is acceptable.
*/
typedefstringobj_name;

/*
*An object version.
*The version of the object, starting at 1.
*/
typedefintobj_ver;

/*
*A string that uniquely identifies an object in the workspace service.
*
*The format is [ws_name or id]/[obj_name or id]/[obj_ver].
*For example, MyFirstWorkspace/MyFirstObject/3 would identify the third version
*of an object called MyFirstObject in the workspace called
*MyFirstWorkspace. 42/Panic/1 would identify the first version of
*the object name Panic in workspace with id 42. Towel/1/6 would
*identify the 6th version of the object with id 1 in the Towel
*workspace.If the version number is omitted, the latest version of
*the object is assumed.
*/
typedefstringobj_ref;

/*
*An object identifier.
*
*Select an object by either:
*One, and only one, of the numerical id or name of the workspace.
*ws_id wsid - the numerical ID of the workspace.
*ws_name workspace - the name of the workspace.
*AND
*One, and only one, of the numerical id or name of the object.
*obj_id objid- the numerical ID of the object.
*obj_name name - name of the object.
*OPTIONALLY
*obj_ver ver - the version of the object.
*OR an object reference string:
*obj_ref ref - an object reference string.
*/
typedefstructure{
ws_nameworkspace;
ws_idwsid;
obj_namename;
obj_idobjid;
obj_verver;
obj_refref;
}
ObjectIdentity;

/*
*A chain of objects with references to one another.
*
*An object reference chain consists of a list of objects where the nth
*object possesses a reference, either in the object itself or in the
*object provenance, to the n+1th object.
*/
typedeflist<ObjectIdentity>ref_chain;

/*
*A chain of objects with references to one another as a string.
*
*A single string that is semantically identical to ref_chain above.
*Represents a path from one workspace object to another through an
*arbitrarily number of intermediate objects where each object has a
*dependency or provenance reference to the next object. Each entry is
*an obj_ref as defined earlier. Entries are separated by semicolons.
*Whitespace is ignored.
*
*Examples:
*3/5/6; kbaseuser:myworkspace/myobject; 5/myobject/2
*aworkspace/6
*/
typedefstringref_string;

/*
*A path into an object.
*Identify a sub portion of an object by providing the path, delimited by
*a slash (/), to that portion of the object. Thus the path may not have
*slashes in the structure or mapping keys. Examples:
*/foo/bar/3 - specifies the bar key of the foo mapping and the 3rd
*entry of the array if bar maps to an array or the value mapped to
*the string "3" if bar maps to a map.
*/foo/bar/[*]/baz - specifies the baz field of all the objects in the
*list mapped by the bar key in the map foo.
*/foo/asterisk/baz - specifies the baz field of all the objects in the
*values of the foo mapping. Swap 'asterisk' for * in the path.
*In case you need to use '/' or '~' in path items use JSON Pointer
*notation defined here: http://tools.ietf.org/html/rfc6901
*/
typedefstringobject_path;

/*
*DEPRECATED
*
*An object subset identifier.
*
*Select a subset of an object by:
*EITHER
*One, and only one, of the numerical id or name of the workspace.
*ws_id wsid - the numerical ID of the workspace.
*ws_name workspace - name of the workspace.
*AND
*One, and only one, of the numerical id or name of the object.
*obj_id objid- the numerical ID of the object.
*obj_name name - name of the object.
*OPTIONALLY
*obj_ver ver - the version of the object.
*OR an object reference string:
*obj_ref ref - an object reference string.
*AND a subset specification:
*list<object_path> included - the portions of the object to include
*in the object subset.
*boolean strict_maps - if true, throw an exception if the subset
*specification traverses a non-existant map key (default false)
*boolean strict_arrays - if true, throw an exception if the subset
*specification exceeds the size of an array (default true)
*
*@deprecatedWorkspace.ObjectSpecification
*/
typedefstructure{
ws_nameworkspace;
ws_idwsid;
obj_namename;
obj_idobjid;
obj_verver;
obj_refref;
list<object_path>included;
booleanstrict_maps;
booleanstrict_arrays;
}
SubObjectIdentity;

/*
*An Object Specification (OS). Inherits from ObjectIdentity (OI).
*Specifies which object, and which parts of that object, to retrieve
*from the Workspace Service.
*
*The fields wsid, workspace, objid, name, and ver are identical to
*the OI fields.
*
*The ref field's behavior is extended from OI. It maintains its
*previous behavior, but now also can act as a reference string. See
*reference following below for more information.
*
*REFERENCE FOLLOWING:
*
*Reference following guarantees that a user that has access to an
*object can always see a) objects that are referenced inside the object
*and b) objects that are referenced in the object's provenance. This
*ensures that the user has visibility into the entire provenance of the
*object and the object's object dependencies (e.g. references).
*
*The user must have at least read access to the object specified in this
*SO, but need not have access to any further objects in the reference
*chain, and those objects may be deleted.
*
*Optional reference following fields:
*Note that only one of the following fields may be specified.
*
*ref_chain obj_path - a path to the desired object from the object
*specified in this OS. In other words, the object specified in this
*OS is assumed to be accessible to the user, and the objects in
*the object path represent a chain of references to the desired
*object at the end of the object path. If the references are all
*valid, the desired object will be returned.
*- OR -
*list<obj_ref> obj_ref_path - shorthand for the obj_path.
*- OR -
*ref_chain to_obj_path - identical to obj_path, except that the path
*is TO the object specified in this OS, rather than from the object.
*In other words the object specified by wsid/objid/ref etc. is the
*end of the path, and to_obj_path is the rest of the path. The user
*must have access to the first object in the to_obj_path.
*- OR -
*list<obj_ref> to_obj_ref_path - shorthand for the to_obj_path.
*- OR -
*ref_string ref - A string representing a reference path from
*one object to another. Unlike the previous reference following
*options, the ref_string represents the ENTIRE path from the source
*object to the target object. As with the OI object, the ref field
*may contain a single reference.
*- OR -
*boolean find_refence_path - This is the last, slowest, and most expensive resort
*for getting a referenced object - do not use this method unless the
*path to the object is unavailable by any other means. Setting the
*find_refence_path parameter to true means that the workspace service will
*search through the object reference graph from the object specified
*in this OS to find an object that 1) the user can access, and 2)
*has an unbroken reference path to the target object. If the search
*succeeds, the object will be returned as normal. Note that the search
*will automatically fail after a certain (but much larger than necessary
*for the vast majority of cases) number of objects are traversed.
*
*
*OBJECT SUBSETS:
*
*When selecting a subset of an array in an object, the returned
*array is compressed to the size of the subset, but the ordering of
*the array is maintained. For example, if the array stored at the
*'feature' key of a Genome object has 4000 entries, and the object paths
*provided are:
*/feature/7
*/feature/3015
*/feature/700
*The returned feature array will be of length three and the entries will
*consist, in order, of the 7th, 700th, and 3015th entries of the
*original array.
*
*Optional object subset fields:
*list<object_path> included - the portions of the object to include
*in the object subset.
*boolean strict_maps - if true, throw an exception if the subset
*specification traverses a non-existent map key (default false)
*boolean strict_arrays - if true, throw an exception if the subset
*specification exceeds the size of an array (default true)
*/
typedefstructure{
ws_nameworkspace;
ws_idwsid;
obj_namename;
obj_idobjid;
obj_verver;
ref_stringref;
ref_chainobj_path;
list<obj_ref>obj_ref_path;
ref_chainto_obj_path;
list<obj_ref>to_obj_ref_path;
booleanfind_reference_path;
list<object_path>included;
booleanstrict_maps;
booleanstrict_arrays;
}
ObjectSpecification;

/*
*Meta data associated with an object stored in a workspace. Provided for
*backwards compatibility.
*
*obj_name id - name of the object.
*type_string type - type of the object.
*timestamp moddate - date when the object was saved
*obj_ver instance - the version of the object
*string command - Deprecated. Always returns the empty string.
*username lastmodifier - name of the user who last saved the object,
*including copying the object
*username owner - Deprecated. Same as lastmodifier.
*ws_name workspace - name of the workspace in which the object is
*stored
*string ref - Deprecated. Always returns the empty string.
*string chsum - the md5 checksum of the object.
*usermeta metadata - arbitrary user-supplied metadata about
*the object.
*obj_id objid - the numerical id of the object.
*
*@deprecatedobject_info
*/
typedeftuple<obj_nameid,type_stringtype,timestampmoddate,intinstance,stringcommand,usernamelastmodifier,usernameowner,ws_nameworkspace,stringref,stringchsum,usermetametadata,obj_idobjid>object_metadata;

/*
*Information about an object, including user provided metadata.
*
*obj_id objid - the numerical id of the object.
*obj_name name - the name of the object.
*type_string type - the type of the object.
*timestamp save_date - the save date of the object.
*obj_ver ver - the version of the object.
*username saved_by - the user that saved or copied the object.
*ws_id wsid - the workspace containing the object.
*ws_name workspace - the workspace containing the object.
*string chsum - the md5 checksum of the object.
*int size - the size of the object in bytes.
*usermeta meta - arbitrary user-supplied metadata about
*the object.
*/
typedeftuple<obj_idobjid,obj_namename,type_stringtype,timestampsave_date,intversion,usernamesaved_by,ws_idwsid,ws_nameworkspace,stringchsum,intsize,usermetameta>object_info;

/*
*Information about an object as a struct rather than a tuple.
*This allows adding fields in a backward compatible way in the future.
*Includes more fields than object_info.
*
*obj_id objid - the numerical id of the object.
*obj_name name - the name of the object.
*type_string type - the type of the object.
*timestamp save_date - the save date of the object.
*obj_ver ver - the version of the object.
*username saved_by - the user that saved or copied the object.
*ws_id wsid - the workspace containing the object.
*ws_name workspace - the workspace containing the object.
*string chsum - the md5 checksum of the object.
*int size - the size of the object in bytes.
*usermeta meta - arbitrary user-supplied metadata about the object.
*usermeta adminmeta - service administrator metadata set on an object. Unlike most
*other object fields, admin metadata is mutable.
*list<obj_ref> path - the path to the object.
*/
typedefstructure{
obj_idobjid;
obj_namename;
type_stringtype;
timestampsave_date;
intversion;
usernamesaved_by;
ws_idwsid;
ws_nameworkspace;
stringchsum;
intsize;
usermetameta;
usermetaadminmeta;
list<obj_ref>path;
}
ObjectInfo;

/*
*An external data unit. A piece of data from a source outside the
*Workspace.
*
*On input, only one of the resource_release_date or
*resource_release_epoch may be supplied. Both are supplied on output.
*
*All fields are optional, but at least one field must be present.
*
*string resource_name - the name of the resource, for example JGI.
*string resource_url - the url of the resource, for example
*http://genome.jgi.doe.gov
*string resource_version - version of the resource
*timestamp resource_release_date - the release date of the resource
*epoch resource_release_epoch - the release date of the resource
*string data_url - the url of the data, for example
*http://genome.jgi.doe.gov/pages/dynamicOrganismDownload.jsf?
*organism=BlaspURHD0036
*string data_id - the id of the data, for example
*7625.2.79179.AGTTCC.adnq.fastq.gz
*string description - a free text description of the data.
*/
typedefstructure{
stringresource_name;
stringresource_url;
stringresource_version;
timestampresource_release_date;
epochresource_release_epoch;
stringdata_url;
stringdata_id;
stringdescription;
}
ExternalDataUnit;

/*
*Information about a subaction that is invoked by a provenance action.
*
*A provenance action (PA) may invoke subactions (SA), e.g. calling a
*separate piece of code, a service, or a script. In most cases these
*calls are the same from PA to PA and so do not need to be listed in
*the provenance since providing information about the PA alone provides
*reproducibility.
*
*In some cases, however, SAs may change over time, such that invoking
*the same PA with the same parameters may produce different results.
*For example, if a PA calls a remote server, that server may be updated
*between a PA invoked on day T and another PA invoked on day T+1.
*
*The SubAction structure allows for specifying information about SAs
*that may dynamically change from PA invocation to PA invocation.
*
*All fields are optional but at least one field must be present.
*
*string name - the name of the SA.
*string ver - the version of SA.
*string code_url - a url pointing to the SA's codebase.
*string commit - a version control commit ID for the SA.
*string endpoint_url - a url pointing to the access point for the SA -
*a server url, for instance.
*/
typedefstructure{
stringname;
stringver;
stringcode_url;
stringcommit;
stringendpoint_url;
}
SubAction;

/*
*A provenance action.
*
*A provenance action (PA) is an action taken while transforming one data
*object to another. There may be several PAs taken in series. A PA is
*typically running a script, running an api command, etc. All of the
*following fields are optional, but more information provided equates to
*better data provenance.
*
*If a provenance action has no fields defined at all, it is silently dropped from
*the list.
*
*resolved_ws_objects should never be set by the user; it is set by the
*workspace service when returning data.
*
*On input, only one of the time or epoch may be supplied. Both are
*supplied on output.
*
*The maximum size of the entire provenance object, including all actions,
*is 1MB.
*
*timestamp time - the time the action was started
*epoch epoch - the time the action was started.
*string caller - the name or id of the invoker of this provenance
*action. In most cases, this will be the same for all PAs.
*string service - the name of the service that performed this action.
*string service_ver - the version of the service that performed this action.
*string method - the method of the service that performed this action.
*list<UnspecifiedObject> method_params - the parameters of the method
*that performed this action. If an object in the parameters is a
*workspace object, also put the object reference in the
*input_ws_object list.
*string script - the name of the script that performed this action.
*string script_ver - the version of the script that performed this action.
*string script_command_line - the command line provided to the script
*that performed this action. If workspace objects were provided in
*the command line, also put the object reference in the
*input_ws_object list.
*list<ref_string> input_ws_objects - the workspace objects that
*were used as input to this action; typically these will also be
*present as parts of the method_params or the script_command_line
*arguments. A reference path into the object graph may be supplied.
*list<obj_ref> resolved_ws_objects - the workspace objects ids from
*input_ws_objects resolved to permanent workspace object references
*by the workspace service.
*list<string> intermediate_incoming - if the previous action produced
*output that 1) was not stored in a referrable way, and 2) is
*used as input for this action, provide it with an arbitrary and
*unique ID here, in the order of the input arguments to this action.
*These IDs can be used in the method_params argument.
*list<string> intermediate_outgoing - if this action produced output
*that 1) was not stored in a referrable way, and 2) is
*used as input for the next action, provide it with an arbitrary and
*unique ID here, in the order of the output values from this action.
*These IDs can be used in the intermediate_incoming argument in the
*next action.
*list<ExternalDataUnit> external_data - data external to the workspace
*that was either imported to the workspace or used to create a
*workspace object.
*list<SubAction> subactions - the subactions taken as a part of this
*action.
*mapping<string, string> custom - user definable custom provenance
*fields and their values.
*string description - a free text description of this action.
*/
typedefstructure{
timestamptime;
epochepoch;
stringcaller;
stringservice;
stringservice_ver;
stringmethod;
list<UnspecifiedObject>method_params;
stringscript;
stringscript_ver;
stringscript_command_line;
list<ref_string>input_ws_objects;
list<obj_ref>resolved_ws_objects;
list<string>intermediate_incoming;
list<string>intermediate_outgoing;
list<ExternalDataUnit>external_data;
list<SubAction>subactions;
mapping<string,string>custom;
stringdescription;
}
ProvenanceAction;

/*
*Returns the version of the workspace service.
*/
funcdefver()returns(stringver)authenticationnone;

/*
*Input parameters for the "create_workspace" function.
*
*Required arguments:
*ws_name workspace - name of the workspace to be created.
*
*Optional arguments:
*permission globalread - 'r' to set the new workspace globally readable,
*default 'n'.
*string description - A free-text description of the new workspace, 1000
*characters max. Longer strings will be mercilessly and brutally
*truncated.
*usermeta meta - arbitrary user-supplied metadata for the workspace.
*/
typedefstructure{
ws_nameworkspace;
permissionglobalread;
stringdescription;
usermetameta;
}
CreateWorkspaceParams;

/*
*Creates a new workspace.
*/
funcdefcreate_workspace(CreateWorkspaceParamsparams)returns(workspace_infoinfo)authenticationrequired;

/*
*Input parameters for the "alter_workspace_metadata" function.
*
*Required arguments:
*WorkspaceIdentity wsi - the workspace to be altered
*
*One or both of the following arguments are required:
*usermeta new - metadata to assign to the workspace. Duplicate keys will
*be overwritten.
*list<string> remove - these keys will be removed from the workspace
*metadata key/value pairs.
*/
typedefstructure{
WorkspaceIdentitywsi;
usermetanew;
list<string>remove;
}
AlterWorkspaceMetadataParams;

/*
*Change the metadata associated with a workspace.
*/
funcdefalter_workspace_metadata(AlterWorkspaceMetadataParamsparams)returns()authenticationrequired;

/*
*Input parameters for the "clone_workspace" function.
*
*Note that deleted objects are not cloned, although hidden objects are
*and remain hidden in the new workspace.
*
*Required arguments:
*WorkspaceIdentity wsi - the workspace to be cloned.
*ws_name workspace - name of the workspace to be cloned into. This must
*be a non-existant workspace name.
*
*Optional arguments:
*permission globalread - 'r' to set the new workspace globally readable,
*default 'n'.
*string description - A free-text description of the new workspace, 1000
*characters max. Longer strings will be mercilessly and brutally
*truncated.
*usermeta meta - arbitrary user-supplied metadata for the workspace.
*list<ObjectIdentity> exclude - exclude the specified objects from the
*cloned workspace. Either an object ID or a object name must be
*specified in each ObjectIdentity - any supplied reference strings,
*workspace names or IDs, and versions are ignored.
*/
typedefstructure{
WorkspaceIdentitywsi;
ws_nameworkspace;
permissionglobalread;
stringdescription;
usermetameta;
list<ObjectIdentity>exclude;
}
CloneWorkspaceParams;

/*
*Clones a workspace.
*/
funcdefclone_workspace(CloneWorkspaceParamsparams)returns(workspace_infoinfo)authenticationrequired;

/*
*Lock a workspace, preventing further changes.
*
*WARNING: Locking a workspace is permanent. A workspace, once locked,
*cannot be unlocked.
*
*The only changes allowed for a locked workspace are changing user
*based permissions or making a private workspace globally readable,
*thus permanently publishing the workspace. A locked, globally readable
*workspace cannot be made private.
*/
funcdeflock_workspace(WorkspaceIdentitywsi)returns(workspace_infoinfo)authenticationrequired;

/*
*DEPRECATED
*
*Input parameters for the "get_workspacemeta" function. Provided for
*backwards compatibility.
*
*One, and only one of:
*ws_name workspace - name of the workspace.
*ws_id id - the numerical ID of the workspace.
*
*Optional arguments:
*string auth - the authentication token of the KBase account accessing
*the workspace. Overrides the client provided authorization
*credentials if they exist.
*
*@deprecatedWorkspace.WorkspaceIdentity
*/
typedefstructure{
ws_nameworkspace;
ws_idid;
stringauth;
}
get_workspacemeta_params;

/*
*Retrieves the metadata associated with the specified workspace.
*Provided for backwards compatibility.
*@deprecatedWorkspace.get_workspace_info
*/
funcdefget_workspacemeta(get_workspacemeta_paramsparams)returns(workspace_metadatametadata)authenticationoptional;

/*
*Get information associated with a workspace.
*/
funcdefget_workspace_info(WorkspaceIdentitywsi)returns(workspace_infoinfo)authenticationoptional;

/*
*Get a workspace's description.
*/
funcdefget_workspace_description(WorkspaceIdentitywsi)returns(stringdescription)authenticationoptional;

/*
*Input parameters for the "set_permissions" function.
*
*One, and only one, of the following is required:
*ws_id id - the numerical ID of the workspace.
*ws_name workspace - the name of the workspace.
*
*Required arguments:
*permission new_permission - the permission to assign to the users.
*list<username> users - the users whose permissions will be altered.
*/
typedefstructure{
ws_nameworkspace;
ws_idid;
permissionnew_permission;
list<username>users;
}
SetPermissionsParams;

/*
*Set permissions for a workspace.
*/
funcdefset_permissions(SetPermissionsParamsparams)returns()authenticationrequired;

/*
*Input parameters for the "set_global_permission" function.
*
*One, and only one, of the following is required:
*ws_id id - the numerical ID of the workspace.
*ws_name workspace - the name of the workspace.
*
*Required arguments:
*permission new_permission - the permission to assign to all users,
*either 'n' or 'r'. 'r' means that all users will be able to read
*the workspace; otherwise users must have specific permission to
*access the workspace.
*/
typedefstructure{
ws_nameworkspace;
ws_idid;
permissionnew_permission;
}
SetGlobalPermissionsParams;

/*
*Set the global permission for a workspace.
*/
funcdefset_global_permission(SetGlobalPermissionsParamsparams)returns()authenticationrequired;

/*
*Input parameters for the "set_workspace_description" function.
*
*One, and only one, of the following is required:
*ws_id id - the numerical ID of the workspace.
*ws_name workspace - the name of the workspace.
*
*Optional arguments:
*string description - A free-text description of the workspace, 1000
*characters max. Longer strings will be mercilessly and brutally
*truncated. If omitted, the description is set to null.
*/
typedefstructure{
ws_nameworkspace;
ws_idid;
stringdescription;
}
SetWorkspaceDescriptionParams;

/*
*Set the description for a workspace.
*/
funcdefset_workspace_description(SetWorkspaceDescriptionParamsparams)returns()authenticationrequired;

/*
*Input parameters for the "get_permissions_mass" function.
*workspaces - the workspaces for which to return the permissions,
*maximum 1000.
*/
typedefstructure{
list<WorkspaceIdentity>workspaces;
}
GetPermissionsMassParams;

/*
*A set of workspace permissions.
*perms - the list of permissions for each requested workspace
*/
typedefstructure{
list<mapping<username,permission>>perms;
}
WorkspacePermissions;

/*
*Get permissions for multiple workspaces.
*/
funcdefget_permissions_mass(GetPermissionsMassParamsmass)returns(WorkspacePermissionsperms)authenticationoptional;

/*
*Get permissions for a workspace.
*@deprecatedget_permissions_mass
*/
funcdefget_permissions(WorkspaceIdentitywsi)returns(mapping<username,permission>perms)authenticationoptional;

/*
*Input parameters for the "save_object" function. Provided for backwards
*compatibility.
*
*Required arguments:
*type_string type - type of the object to be saved
*ws_name workspace - name of the workspace where the object is to be
*saved
*obj_name id - name behind which the object will be saved in the
*workspace
*UnspecifiedObject data - data to be saved in the workspace
*
*Optional arguments:
*usermeta metadata - arbitrary user-supplied metadata for the object,
*not to exceed 16kb; if the object type specifies automatic
*metadata extraction with the 'meta ws' annotation, and your
*metadata name conflicts, then your metadata will be silently
*overwritten.
*string auth - the authentication token of the KBase account accessing
*the workspace. Overrides the client provided authorization
*credentials if they exist.
*
*@deprecated
*/
typedefstructure{
obj_nameid;
type_stringtype;
UnspecifiedObjectdata;
ws_nameworkspace;
mapping<string,string>metadata;
stringauth;
}
save_object_params;

/*
*Saves the input object data and metadata into the selected workspace,
*returning the object_metadata of the saved object. Provided
*for backwards compatibility.
*
*@deprecatedWorkspace.save_objects
*/
funcdefsave_object(save_object_paramsparams)returns(object_metadatametadata)authenticationoptional;

/*
*An object and associated data required for saving.
*
*Required arguments:
*type_string type - the type of the object. Omit the version information
*to use the latest version.
*UnspecifiedObject data - the object data.
*One, and only one, of:
*obj_name name - the name of the object.
*obj_id objid - the id of the object to save over.
*
*
*Optional arguments:
*usermeta meta - arbitrary user-supplied metadata for the object,
*not to exceed 16kb; if the object type specifies automatic
*metadata extraction with the 'meta ws' annotation, and your
*metadata name conflicts, then your metadata will be silently
*overwritten.
*list<ProvenanceAction> provenance - provenance data for the object.
*boolean hidden - true if this object should not be listed when listing
*workspace objects.
*/
typedefstructure{
type_stringtype;
UnspecifiedObjectdata;
obj_namename;
obj_idobjid;
usermetameta;
list<ProvenanceAction>provenance;
booleanhidden;
}
ObjectSaveData;

/*
*Input parameters for the "save_objects" function.
*
*One, and only one, of the following is required:
*ws_id id - the numerical ID of the workspace.
*ws_name workspace - the name of the workspace.
*
*Required arguments:
*list<ObjectSaveData> objects - the objects to save.
*/
typedefstructure{
ws_nameworkspace;
ws_idid;
list<ObjectSaveData>objects;
}
SaveObjectsParams;

/*
*Save objects to the workspace. Saving over a deleted object undeletes
*it.
*/
funcdefsave_objects(SaveObjectsParamsparams)returns(list<object_info>info)authenticationrequired;

/*
*Input parameters for the "get_object" function. Provided for backwards
*compatibility.
*
*Required arguments:
*ws_name workspace - Name of the workspace containing the object to be
*retrieved
*obj_name id - Name of the object to be retrieved
*
*Optional arguments:
*int instance - Version of the object to be retrieved, enabling
*retrieval of any previous version of an object
*string auth - the authentication token of the KBase account accessing
*the object. Overrides the client provided authorization
*credentials if they exist.
*
*@deprecatedWorkspace.ObjectIdentity
*/
typedefstructure{
obj_nameid;
ws_nameworkspace;
intinstance;
stringauth;
}
get_object_params;

/*
*Output generated by the "get_object" function. Provided for backwards
*compatibility.
*
*UnspecifiedObject data - The object's data.
*object_metadata metadata - Metadata for object retrieved/
*
*@deprecatedWorkspaces.ObjectData
*/
typedefstructure{
UnspecifiedObjectdata;
object_metadatametadata;
}
get_object_output;

/*
*Retrieves the specified object from the specified workspace.
*Both the object data and metadata are returned.
*Provided for backwards compatibility.
*
*@deprecatedWorkspace.get_objects
*/
funcdefget_object(get_object_paramsparams)returns(get_object_outputoutput)authenticationoptional;

/*
*DEPRECATED
*
*The provenance and supplemental info for an object.
*
*object_info info - information about the object.
*list<ProvenanceAction> provenance - the object's provenance.
*username creator - the user that first saved the object to the
*workspace.
*ws_id orig_wsid - the id of the workspace in which this object was
*originally saved. Missing for objects saved prior to version
*0.4.1.
*timestamp created - the date the object was first saved to the
*workspace.
*epoch epoch - the date the object was first saved to the
*workspace.
*list<obj_ref> - the references contained within the object.
*obj_ref copied - the reference of the source object if this object is
*a copy and the copy source exists and is accessible.
*null otherwise.
*boolean copy_source_inaccessible - true if the object was copied from
*another object, but that object is no longer accessible to the
*user. False otherwise.
*mapping<id_type, list<extracted_id>> extracted_ids - any ids extracted
*from the object.
*string handle_error - if an error occurs while setting ACLs on
*embedded external IDs, it will be reported here. If not for historical reasons the
*parameter would be called "external_id_error".
*string handle_stacktrace - the stacktrace for handle_error. As above, the parameter
*should be called "external_id_stacktrace".
*
*@deprecated
*/
typedefstructure{
object_infoinfo;
list<ProvenanceAction>provenance;
usernamecreator;
ws_idorig_wsid;
timestampcreated;
epochepoch;
list<obj_ref>refs;
obj_refcopied;
booleancopy_source_inaccessible;
mapping<id_type,list<extracted_id>>extracted_ids;
stringhandle_error;
stringhandle_stacktrace;
}
ObjectProvenanceInfo;

/*
*DEPRECATED
*Get object provenance from the workspace.
*
*@deprecatedWorkspace.get_objects2
*/
funcdefget_object_provenance(list<ObjectIdentity>object_ids)returns(list<ObjectProvenanceInfo>data)authenticationoptional;

/*
*The data and supplemental info for an object.
*
*UnspecifiedObject data - the object's data or subset data.
*object_info info - information about the object.
*ObjectInfo infostruct - information about the object as a structure rather than a tuple.
*list<obj_ref> path - the path to the object through the object reference graph. All the
*references in the path are absolute.
*list<ProvenanceAction> provenance - the object's provenance.
*username creator - the user that first saved the object to the workspace.
*ws_id orig_wsid - the id of the workspace in which this object was
*originally saved. Missing for objects saved prior to version
*0.4.1.
*timestamp created - the date the object was first saved to the
*workspace.
*epoch epoch - the date the object was first saved to the
*workspace.
*list<obj_ref> refs - the references contained within the object.
*obj_ref copied - the reference of the source object if this object is
*a copy and the copy source exists and is accessible.
*null otherwise.
*boolean copy_source_inaccessible - true if the object was copied from
*another object, but that object is no longer accessible to the
*user. False otherwise.
*mapping<id_type, list<extracted_id>> extracted_ids - any ids extracted
*from the object.
*string handle_error - if an error occurs while setting ACLs on
*embedded external IDs, it will be reported here. If not for historical reasons the
*parameter would be called "external_id_error".
*string handle_stacktrace - the stacktrace for handle_error. As above, the parameter
*should be called "external_id_stacktrace".
*/
typedefstructure{
UnspecifiedObjectdata;
object_infoinfo;
ObjectInfoinfostruct;
list<obj_ref>path;
list<ProvenanceAction>provenance;
usernamecreator;
ws_idorig_wsid;
timestampcreated;
epochepoch;
list<obj_ref>refs;
obj_refcopied;
booleancopy_source_inaccessible;
mapping<id_type,list<extracted_id>>extracted_ids;
stringhandle_error;
stringhandle_stacktrace;
}
ObjectData;

/*
*DEPRECATED
*Get objects from the workspace.
*@deprecatedWorkspace.get_objects2
*/
funcdefget_objects(list<ObjectIdentity>object_ids)returns(list<ObjectData>data)authenticationoptional;

/*
*Input parameters for the get_objects2 function.
*
*Required parameters:
*list<ObjectSpecification> objects - the list of object specifications
*for the objects to return (via reference chain and as a subset if
*specified).
*
*Optional parameters:
*boolean ignoreErrors - Don't throw an exception if an object cannot
*be accessed; return null for that object's information instead.
*Default false.
*boolean infostruct - return the object information as a structure rather than a tuple.
*Default false. If true, ObjectData.path will be null as it is provided in
*the ObjectInfo data.
*boolean no_data - return the provenance, references, and
*object_info for this object without the object data. Default false.
*boolean skip_external_system_updates - if the objects contain any external IDs, don't
*contact external systems to perform any updates for those IDs (often ACL updates,
*e.g. for handle / blobstore / sample IDs). In some cases this can speed up fetching the
*data. Default false.
*boolean batch_external_system_updates - if the objects contain any external IDs,
*send all external system updates in a batch to each external system when possible
*rather than object by object. This can potentially speed up the updates, but the
*drawback is that if the external update fails for any object, all the objects that
*required updates for that system will be marked as having a failed update.
*Has no effect if skip_external_system_updates is true. Default false.
*/
typedefstructure{
list<ObjectSpecification>objects;
booleanignoreErrors;
booleaninfostruct;
booleanno_data;
booleanskip_external_system_updates;
booleanbatch_external_system_updates;
}
GetObjects2Params;

/*
*Results from the get_objects2 function.
*
*list<ObjectData> data - the returned objects.
*/
typedefstructure{
list<ObjectData>data;
}
GetObjects2Results;

/*
*Get objects from the workspace.
*/
funcdefget_objects2(GetObjects2Paramsparams)returns(GetObjects2Resultsresults)authenticationoptional;

/*
*DEPRECATED
*Get portions of objects from the workspace.
*
*When selecting a subset of an array in an object, the returned
*array is compressed to the size of the subset, but the ordering of
*the array is maintained. For example, if the array stored at the
*'feature' key of a Genome object has 4000 entries, and the object paths
*provided are:
*/feature/7
*/feature/3015
*/feature/700
*The returned feature array will be of length three and the entries will
*consist, in order, of the 7th, 700th, and 3015th entries of the
*original array.
*@deprecatedWorkspace.get_objects2
*/
funcdefget_object_subset(list<SubObjectIdentity>sub_object_ids)returns(list<ObjectData>data)authenticationoptional;

/*
*Get an object's history. The version argument of the ObjectIdentity is
*ignored.
*/
funcdefget_object_history(ObjectIdentityobject)returns(list<object_info>history)authenticationoptional;

/*
*List objects that reference one or more specified objects. References
*in the deleted state are not returned.
*/
funcdeflist_referencing_objects(list<ObjectIdentity>object_ids)returns(list<list<object_info>>referrers)authenticationoptional;

/*
*DEPRECATED
*
*List the number of times objects have been referenced.
*
*This count includes both provenance and object-to-object references
*and, unlike list_referencing_objects, includes objects that are
*inaccessible to the user.
*
*@deprecated
*/
funcdeflist_referencing_object_counts(list<ObjectIdentity>object_ids)returns(list<int>counts)authenticationoptional;

/*
*DEPRECATED
*
*Get objects by references from other objects.
*
*NOTE: In the vast majority of cases, this method is not necessary and
*get_objects should be used instead.
*
*get_referenced_objects guarantees that a user that has access to an
*object can always see a) objects that are referenced inside the object
*and b) objects that are referenced in the object's provenance. This
*ensures that the user has visibility into the entire provenance of the
*object and the object's object dependencies (e.g. references).
*
*The user must have at least read access to the first object in each
*reference chain, but need not have access to any further objects in
*the chain, and those objects may be deleted.
*
*@deprecatedWorkspace.get_objects2
*/
funcdefget_referenced_objects(list<ref_chain>ref_chains)returns(list<ObjectData>data)authenticationoptional;

/*
*Input parameters for the "list_workspaces" function. Provided for
*backwards compatibility.
*
*Optional parameters:
*string auth - the authentication token of the KBase account accessing
*the list of workspaces. Overrides the client provided authorization
*credentials if they exist.
*boolean excludeGlobal - if excludeGlobal is true exclude world
*readable workspaces. Defaults to false.
*
*@deprecatedWorkspace.ListWorkspaceInfoParams
*/
typedefstructure{
stringauth;
booleanexcludeGlobal;
}
list_workspaces_params;

/*
*Lists the metadata of all workspaces a user has access to. Provided for
*backwards compatibility - to be replaced by the functionality of
*list_workspace_info
*
*@deprecatedWorkspace.list_workspace_info
*/
funcdeflist_workspaces(list_workspaces_paramsparams)returns(list<workspace_metadata>workspaces)authenticationoptional;

/*
*Input parameters for the "list_workspace_info" function.
*
*Only one of each timestamp/epoch pair may be supplied.
*
*Optional parameters:
*permission perm - filter workspaces by minimum permission level. 'None'
*and 'readable' are ignored.
*list<username> owners - filter workspaces by owner.
*usermeta meta - filter workspaces by the user supplied metadata. NOTE:
*only one key/value pair is supported at this time. A full map
*is provided as input for the possibility for expansion in the
*future.
*timestamp after - only return workspaces that were modified after this
*date.
*timestamp before - only return workspaces that were modified before
*this date.
*epoch after_epoch - only return workspaces that were modified after
*this date.
*epoch before_epoch - only return workspaces that were modified before
*this date.
*boolean excludeGlobal - if excludeGlobal is true exclude world
*readable workspaces. Defaults to false.
*boolean showDeleted - show deleted workspaces that are owned by the
*user.
*boolean showOnlyDeleted - only show deleted workspaces that are owned
*by the user.
*/
typedefstructure{
permissionperm;
list<username>owners;
usermetameta;
timestampafter;
timestampbefore;
epochafter_epoch;
epochbefore_epoch;
booleanexcludeGlobal;
booleanshowDeleted;
booleanshowOnlyDeleted;
}
ListWorkspaceInfoParams;

/*
*List workspaces viewable by the user.
*/
funcdeflist_workspace_info(ListWorkspaceInfoParamsparams)returns(list<workspace_info>wsinfo)authenticationoptional;

/*
*Input parameters for the "list_workspace_ids" function.
*
*Optional parameters:
*permission perm - filter workspaces by minimum permission level. 'None'
*and 'readable' are ignored.
*boolean onlyGlobal - if onlyGlobal is true only include world readable
*workspaces. Defaults to false. If true, excludeGlobal is ignored.
*boolean excludeGlobal - if excludeGlobal is true exclude world
*readable workspaces. Defaults to true.
*/
typedefstructure{
permissionperm;
booleanexcludeGlobal;
booleanonlyGlobal;
}
ListWorkspaceIDsParams;

/*
*Results of the "list_workspace_ids" function.
*
*list<int> workspaces - the workspaces to which the user has explicit
*access.
*list<int> pub - the workspaces to which the user has access because
*they're globally readable.
*/
typedefstructure{
list<int>workspaces;
list<int>pub;
}
ListWorkspaceIDsResults;

/*
*List workspace IDs to which the user has access.
*
*This function returns a subset of the information in the
*list_workspace_info method and should be substantially faster.
*/
funcdeflist_workspace_ids(ListWorkspaceIDsParamsparams)returns(ListWorkspaceIDsResultsresults)authenticationoptional;

/*
*Input parameters for the "list_workspace_objects" function. Provided
*for backwards compatibility.
*
*Required arguments:
*ws_name workspace - Name of the workspace for which objects should be
*listed
*
*Optional arguments:
*type_string type - type of the objects to be listed. Here, omitting
*version information will find any objects that match the provided
*type - e.g. Foo.Bar-0 will match Foo.Bar-0.X where X is any
*existing version.
*boolean showDeletedObject - show objects that have been deleted
*string auth - the authentication token of the KBase account requesting
*access. Overrides the client provided authorization credentials if
*they exist.
*
*@deprecatedWorkspace.ListObjectsParams
*/
typedefstructure{
ws_nameworkspace;
type_stringtype;
booleanshowDeletedObject;
stringauth;
}
list_workspace_objects_params;

/*
*Lists the metadata of all objects in the specified workspace with the
*specified type (or with any type). Provided for backwards compatibility.
*
*@deprecatedWorkspace.list_objects
*/
funcdeflist_workspace_objects(list_workspace_objects_paramsparams)returns(list<object_metadata>objects)authenticationoptional;

/*
*Parameters for the 'list_objects' function.
*
*At least one, and no more than 10000, workspaces must be specified in one of the
*two following parameters. It is strongly recommended that the list is restricted to
*the workspaces of interest, or the results may be very large:
*list<ws_id> ids - the numerical IDs of the workspaces of interest.
*list<ws_name> workspaces - the names of the workspaces of interest.
*
*Only one of each timestamp/epoch pair may be supplied.
*
*Optional arguments:
*type_string type - type of the objects to be listed. Here, omitting
*version information will find any objects that match the provided
*type - e.g. Foo.Bar-0 will match Foo.Bar-0.X where X is any
*existing version.
*permission perm - DEPRECATED, no longer useful. Filter on minimum permission by providing
*only workspaces with the desired permission levels in the input list(s).
*list<username> savedby - filter objects by the user that saved or
*copied the object.
*usermeta meta - filter objects by the user supplied metadata. NOTE:
*only one key/value pair is supported at this time. A full map
*is provided as input for the possibility for expansion in the
*future.
*timestamp after - only return objects that were created after this
*date.
*timestamp before - only return objects that were created before this
*date.
*epoch after_epoch - only return objects that were created after this
*date.
*epoch before_epoch - only return objects that were created before this
*date.
*string startafter - a reference-like string that determines where the
*list of objects will begin. It takes the form X/Y/Z, where X is
*the workspace ID, Y the object ID, and Z the version. The version
*may be omitted, and the object ID omitted if the version is also
*omitted. After a '/' separator either an integer or no characters
*at all, including whitespace, may occur. Whitespace strings are
*ignored. If startafter is provided, after, before,
*after_epoch, before_epoch, savedby, meta, minObjectID, and
*maxObjectID may not be provided. Only objects that are ordered
*after the reference, exclusive, will be included in the
*result, and the resulting list will be sorted by reference.
*obj_id minObjectID - only return objects with an object id greater or
*equal to this value.
*obj_id maxObjectID - only return objects with an object id less than or
*equal to this value.
*boolean showDeleted - show deleted objects in workspaces to which the
*user has write access.
*boolean showOnlyDeleted - only show deleted objects in workspaces to
*which the user has write access.
*boolean showHidden - show hidden objects.
*boolean showAllVersions - show all versions of each object that match
*the filters rather than only the most recent version.
*boolean includeMetadata - include the user provided metadata in the
*returned object_info. If false (0 or null), the default, the
*metadata will be null.
*boolean excludeGlobal - DEPRECATED, no longer useful. Filter on global workspaces by
*excluding them from the input workspace list(s).
*int limit - limit the output to X objects. Default and maximum value
*is 10000. Limit values < 1 are treated as 10000, the default.
*/
typedefstructure{
list<ws_name>workspaces;
list<ws_id>ids;
type_stringtype;
permissionperm;
list<username>savedby;
usermetameta;
timestampafter;
timestampbefore;
epochafter_epoch;
epochbefore_epoch;
stringstartafter;
obj_idminObjectID;
obj_idmaxObjectID;
booleanshowDeleted;
booleanshowOnlyDeleted;
booleanshowHidden;
booleanshowAllVersions;
booleanincludeMetadata;
booleanexcludeGlobal;
intlimit;
}
ListObjectsParams;

/*
*List objects in one or more workspaces.
*/
funcdeflist_objects(ListObjectsParamsparams)returns(list<object_info>objinfo)authenticationoptional;

/*
*Input parameters for the "get_objectmeta" function.
*
*Required arguments:
*ws_name workspace - name of the workspace containing the object for
*which metadata is to be retrieved
*obj_name id - name of the object for which metadata is to be retrieved
*
*Optional arguments:
*int instance - Version of the object for which metadata is to be
*retrieved, enabling retrieval of any previous version of an object
*string auth - the authentication token of the KBase account requesting
*access. Overrides the client provided authorization credentials if
*they exist.
*
*@deprecatedWorkspace.ObjectIdentity
*/
typedefstructure{
obj_nameid;
ws_nameworkspace;
intinstance;
stringauth;
}
get_objectmeta_params;

/*
*Retrieves the metadata for a specified object from the specified
*workspace. Provides access to metadata for all versions of the object
*via the instance parameter. Provided for backwards compatibility.
*
*@deprecatedWorkspace.get_object_info3
*/
funcdefget_objectmeta(get_objectmeta_paramsparams)returns(object_metadatametadata)authenticationoptional;

/*
*Get information about objects from the workspace.
*
*Set includeMetadata true to include the user specified metadata.
*Otherwise the metadata in the object_info will be null.
*
*This method will be replaced by the behavior of get_object_info_new
*in the future.
*
*@deprecatedWorkspace.get_object_info3
*/
funcdefget_object_info(list<ObjectIdentity>object_ids,booleanincludeMetadata)returns(list<object_info>info)authenticationoptional;

/*
*Input parameters for the "get_object_info_new" function.
*
*Required arguments:
*list<ObjectSpecification> objects - the objects for which the
*information should be fetched. Subsetting related parameters are
*ignored.
*
*Optional arguments:
*boolean includeMetadata - include the object metadata in the returned
*information. Default false.
*boolean ignoreErrors - Don't throw an exception if an object cannot
*be accessed; return null for that object's information instead.
*Default false.
*
*@deprecatedWorkspace.GetObjectInfo3Params
*/
typedefstructure{
list<ObjectSpecification>objects;
booleanincludeMetadata;
booleanignoreErrors;
}
GetObjectInfoNewParams;

/*
*Get information about objects from the workspace.
*
*@deprecatedWorkspace.get_object_info3
*/
funcdefget_object_info_new(GetObjectInfoNewParamsparams)returns(list<object_info>info)authenticationoptional;

/*
*Input parameters for the "get_object_info3" function.
*
*Required arguments:
*list<ObjectSpecification> objects - the objects for which the
*information should be fetched. Subsetting related parameters are
*ignored.
*
*Optional arguments:
*boolean infostruct - return information about the object as a structure rather than a tuple.
*Default false. If true, infos and paths will be null.
*boolean includeMetadata - include the user and admin metadata in the returned
*information. Default false.
*boolean ignoreErrors - Don't throw an exception if an object cannot
*be accessed; return null for that object's information and path instead.
*Default false.
*/
typedefstructure{
list<ObjectSpecification>objects;
booleaninfostruct;
booleanincludeMetadata;
booleanignoreErrors;
}
GetObjectInfo3Params;

/*
*Output from the get_object_info3 function.
*
*list<object_info> infos - the object_info data for each object.
*list<list<obj_ref> paths - the path to the object through the object reference graph for
*each object. All the references in the path are absolute.
*list<ObjectInfo> infostructs - the ObjectInfo data for each object.
*/
typedefstructure{
list<object_info>infos;
list<list<obj_ref>>paths;
list<ObjectInfo>infostructs;
}
GetObjectInfo3Results;

funcdefget_object_info3(GetObjectInfo3Paramsparams)returns(GetObjectInfo3Resultsresults)authenticationoptional;

/*
*Input parameters for the 'rename_workspace' function.
*
*Required arguments:
*WorkspaceIdentity wsi - the workspace to rename.
*ws_name new_name - the new name for the workspace.
*/
typedefstructure{
WorkspaceIdentitywsi;
ws_namenew_name;
}
RenameWorkspaceParams;

/*
*Rename a workspace.
*/
funcdefrename_workspace(RenameWorkspaceParamsparams)returns(workspace_inforenamed)authenticationrequired;

/*
*Input parameters for the 'rename_object' function.
*
*Required arguments:
*ObjectIdentity obj - the object to rename.
*obj_name new_name - the new name for the object.
*/
typedefstructure{
ObjectIdentityobj;
obj_namenew_name;
}
RenameObjectParams;

/*
*Rename an object. User meta data is always returned as null.
*/
funcdefrename_object(RenameObjectParamsparams)returns(object_inforenamed)authenticationrequired;

/*
*Input parameters for the 'copy_object' function.
*
*If the 'from' ObjectIdentity includes no version and the object is
*copied to a new name, the entire version history of the object is
*copied. In all other cases only the version specified, or the latest
*version if no version is specified, is copied.
*
*The version from the 'to' ObjectIdentity is always ignored.
*
*Required arguments:
*ObjectIdentity from - the object to copy.
*ObjectIdentity to - where to copy the object.
*/
typedefstructure{
ObjectIdentityfrom;
ObjectIdentityto;
}
CopyObjectParams;

/*
*Copy an object. Returns the object_info for the newest version.
*/
funcdefcopy_object(CopyObjectParamsparams)returns(object_infocopied)authenticationrequired;

/*
*Revert an object.
*
*The object specified in the ObjectIdentity is reverted to the version
*specified in the ObjectIdentity.
*/
funcdefrevert_object(ObjectIdentityobject)returns(object_inforeverted)authenticationrequired;

/*
*Input parameters for the get_names_by_prefix function.
*
*Required arguments:
*list<WorkspaceIdentity> workspaces - the workspaces to search.
*string prefix - the prefix of the object names to return.
*
*Optional arguments:
*boolean includeHidden - include names of hidden objects in the results.
*Default false.
*/
typedefstructure{
list<WorkspaceIdentity>workspaces;
stringprefix;
booleanincludeHidden;
}
GetNamesByPrefixParams;

/*
*Results object for the get_names_by_prefix function.
*
*list<list<obj_name>> names - the names matching the provided prefix,
*listed in order of the input workspaces.
*/
typedefstructure{
list<list<obj_name>>names;
}
GetNamesByPrefixResults;

/*
*Get object names matching a prefix. At most 1000 names are returned.
*No particular ordering is guaranteed, nor is which names will be
*returned if more than 1000 are found.
*
*This function is intended for use as an autocomplete helper function.
*/
funcdefget_names_by_prefix(GetNamesByPrefixParamsparams)returns(GetNamesByPrefixResultsres)authenticationoptional;

/*
*Hide objects. All versions of an object are hidden, regardless of
*the version specified in the ObjectIdentity. Hidden objects do not
*appear in the list_objects method.
*/
funcdefhide_objects(list<ObjectIdentity>object_ids)returns()authenticationrequired;

/*
*Unhide objects. All versions of an object are unhidden, regardless
*of the version specified in the ObjectIdentity.
*/
funcdefunhide_objects(list<ObjectIdentity>object_ids)returns()authenticationrequired;

/*
*Delete objects. All versions of an object are deleted, regardless of
*the version specified in the ObjectIdentity.
*/
funcdefdelete_objects(list<ObjectIdentity>object_ids)returns()authenticationrequired;

/*
*Undelete objects. All versions of an object are undeleted, regardless
*of the version specified in the ObjectIdentity. If an object is not
*deleted, no error is thrown.
*/
funcdefundelete_objects(list<ObjectIdentity>object_ids)returns()authenticationrequired;

/*
*Delete a workspace. All objects contained in the workspace are deleted.
*/
funcdefdelete_workspace(WorkspaceIdentitywsi)returns()authenticationrequired;

/*
*A type specification (typespec) file in the KBase Interface Description
*Language (KIDL).
*/
typedefstringtypespec;

/*
*A module name defined in a KIDL typespec.
*/
typedefstringmodulename;

/*
*A type definition name in a KIDL typespec.
*/
typedefstringtypename;

/*
*A version of a type.
*Specifies the version of the type in a single string in the format
*[major].[minor]:
*
*major - an integer. The major version of the type. A change in the
*major version implies the type has changed in a non-backwards
*compatible way.
*minor - an integer. The minor version of the type. A change in the
*minor version implies that the type has changed in a way that is
*backwards compatible with previous type definitions.
*/
typedefstringtypever;

/*
*A function string for referencing a funcdef.
*Specifies the function and its version in a single string in the format
*[modulename].[funcname]-[major].[minor]:
*
*modulename - a string. The name of the module containing the function.
*funcname - a string. The name of the function as assigned by the funcdef
*statement.
*major - an integer. The major version of the function. A change in the
*major version implies the function has changed in a non-backwards
*compatible way.
*minor - an integer. The minor version of the function. A change in the
*minor version implies that the function has changed in a way that is
*backwards compatible with previous function definitions.
*
*In many cases, the major and minor versions are optional, and if not
*provided the most recent version will be used.
*
*Example: MyModule.MyFunc-3.1
*/
typedefstringfunc_string;

/*
*The version of a typespec file.
*/
typedefintspec_version;

/*
*The JSON Schema (v4) representation of a type definition.
*/
typedefstringjsonschema;

/*
*Request ownership of a module name. A Workspace administrator
*must approve the request.
*/
funcdefrequest_module_ownership(modulenamemod)returns()authenticationrequired;

/*
*Parameters for the register_typespec function.
*
*Required arguments:
*One of:
*typespec spec - the new typespec to register.
*modulename mod - the module to recompile with updated options (see below).
*
*Optional arguments:
*boolean dryrun - Return, but do not save, the results of compiling the
*spec. Default true. Set to false for making permanent changes.
*list<typename> new_types - types in the spec to make available in the
*workspace service. When compiling a spec for the first time, if
*this argument is empty no types will be made available. Previously
*available types remain so upon recompilation of a spec or
*compilation of a new spec.
*list<typename> remove_types - no longer make these types available in
*the workspace service for the new version of the spec. This does
*not remove versions of types previously compiled.
*mapping<modulename, spec_version> dependencies - By default, the
*latest released versions of spec dependencies will be included when
*compiling a spec. Specific versions can be specified here.
*spec_version prev_ver - the id of the previous version of the typespec.
*An error will be thrown if this is set and prev_ver is not the
*most recent version of the typespec. This prevents overwriting of
*changes made since retrieving a spec and compiling an edited spec.
*This argument is ignored if a modulename is passed.
*/
typedefstructure{
typespecspec;
modulenamemod;
list<typename>new_types;
list<typename>remove_types;
mapping<modulename,spec_version>dependencies;
booleandryrun;
spec_versionprev_ver;
}
RegisterTypespecParams;

/*
*Register a new typespec or recompile a previously registered typespec
*with new options.
*See the documentation of RegisterTypespecParams for more details.
*Also see the release_types function.
*/
funcdefregister_typespec(RegisterTypespecParamsparams)returns(mapping<type_string,jsonschema>)authenticationrequired;

/*
*Parameters for the register_typespec_copy function.
*
*Required arguments:
*string external_workspace_url - the URL of the workspace server from
*which to copy a typespec.
*modulename mod - the name of the module in the workspace server
*
*Optional arguments:
*spec_version version - the version of the module in the workspace
*server
*/
typedefstructure{
stringexternal_workspace_url;
modulenamemod;
spec_versionversion;
}
RegisterTypespecCopyParams;

/*
*Register a copy of new typespec or refresh an existing typespec which is
*loaded from another workspace for synchronization. Method returns new
*version of module in current workspace.
*
*Also see the release_types function.
*/
funcdefregister_typespec_copy(RegisterTypespecCopyParamsparams)returns(spec_versionnew_local_version)authenticationrequired;

/*
*Release a module for general use of its types.
*
*Releases the most recent version of a module. Releasing a module does
*two things to the module's types:
*1) If a type's major version is 0, it is changed to 1. A major
*version of 0 implies that the type is in development and may have
*backwards incompatible changes from minor version to minor version.
*Once a type is released, backwards incompatible changes always
*cause a major version increment.
*2) This version of the type becomes the default version, and if a
*specific version is not supplied in a function call, this version
*will be used. This means that newer, unreleased versions of the
*type may be skipped.
*/
funcdefrelease_module(modulenamemod)returns(list<type_string>types)authenticationrequired;

/*
*Parameters for the list_modules() function.
*
*Optional arguments:
*username owner - only list modules owned by this user.
*/
typedefstructure{
usernameowner;
}
ListModulesParams;

/*
*List typespec modules.
*/
funcdeflist_modules(ListModulesParamsparams)returns(list<modulename>modules)authenticationnone;

/*
*Parameters for the list_module_versions function.
*
*Required arguments:
*One of:
*modulename mod - returns all versions of the module.
*type_string type - returns all versions of the module associated with
*the type.
*/
typedefstructure{
modulenamemod;
type_stringtype;
}
ListModuleVersionsParams;

/*
*A set of versions from a module.
*
*modulename mod - the name of the module.
*list<spec_version> - a set or subset of versions associated with the
*module.
*list<spec_version> - a set or subset of released versions associated
*with the module.
*/
typedefstructure{
modulenamemod;
list<spec_version>vers;
list<spec_version>released_vers;
}
ModuleVersions;

/*
*List typespec module versions.
*/
funcdeflist_module_versions(ListModuleVersionsParamsparams)returns(ModuleVersionsvers)authenticationoptional;

/*
*Parameters for the get_module_info function.
*
*Required arguments:
*modulename mod - the name of the module to retrieve.
*
*Optional arguments:
*spec_version ver - the version of the module to retrieve. Defaults to
*the latest version.
*/
typedefstructure{
modulenamemod;
spec_versionver;
}
GetModuleInfoParams;

/*
*Information about a module.
*
*list<username> owners - the owners of the module.
*spec_version ver - the version of the module.
*typespec spec - the typespec.
*string description - the description of the module from the typespec.
*mapping<type_string, jsonschema> types - the types associated with this
*module and their JSON schema.
*mapping<modulename, spec_version> included_spec_version - names of
*included modules associated with their versions.
*string chsum - the md5 checksum of the object.
*list<func_string> functions - list of names of functions registered in spec.
*boolean is_released - shows if this version of module was released (and
*hence can be seen by others).
*/
typedefstructure{
list<username>owners;
spec_versionver;
typespecspec;
stringdescription;
mapping<type_string,jsonschema>types;
mapping<modulename,spec_version>included_spec_version;
stringchsum;
list<func_string>functions;
booleanis_released;
}
ModuleInfo;

funcdefget_module_info(GetModuleInfoParamsparams)returns(ModuleInfoinfo)authenticationoptional;

/*
*Get JSON schema for a type.
*/
funcdefget_jsonschema(type_stringtype)returns(jsonschemaschema)authenticationoptional;

/*
*Translation from types qualified with MD5 to their semantic versions
*/
funcdeftranslate_from_MD5_types(list<type_string>md5_types)returns(mapping<type_string,list<type_string>>sem_types)authenticationnone;

/*
*Translation from types qualified with semantic versions to their MD5'ed versions
*/
funcdeftranslate_to_MD5_types(list<type_string>sem_types)returns(mapping<type_string,type_string>md5_types)authenticationoptional;

/*
*Information about a type
*
*type_string type_def - resolved type definition id.
*string description - the description of the type from spec file.
*string spec_def - reconstruction of type definition from spec file.
*jsonschema json_schema - JSON schema of this type.
*string parsing_structure - json document describing parsing structure of type
*in spec file including involved sub-types.
*list<spec_version> module_vers - versions of spec-files containing
*given type version.
*list<spec_version> released_module_vers - versions of released spec-files
*containing given type version.
*list<type_string> type_vers - all versions of type with given type name.
*list<type_string> released_type_vers - all released versions of type with
*given type name.
*list<func_string> using_func_defs - list of functions (with versions)
*referring to this type version.
*list<type_string> using_type_defs - list of types (with versions)
*referring to this type version.
*list<type_string> used_type_defs - list of types (with versions)
*referred from this type version.
*/
typedefstructure{
type_stringtype_def;
stringdescription;
stringspec_def;
jsonschemajson_schema;
stringparsing_structure;
list<spec_version>module_vers;
list<spec_version>released_module_vers;
list<type_string>type_vers;
list<type_string>released_type_vers;
list<func_string>using_func_defs;
list<type_string>using_type_defs;
list<type_string>used_type_defs;
}
TypeInfo;

funcdefget_type_info(type_stringtype)returns(TypeInfoinfo)authenticationoptional;

funcdefget_all_type_info(modulenamemod)returns(list<TypeInfo>)authenticationoptional;

/*
*DEPRECATED
*@deprecated
*/
typedefstructure{
func_stringfunc_def;
stringdescription;
stringspec_def;
stringparsing_structure;
list<spec_version>module_vers;
list<spec_version>released_module_vers;
list<func_string>func_vers;
list<func_string>released_func_vers;
list<type_string>used_type_defs;
}
FuncInfo;

/*
*@deprecated
*/
funcdefget_func_info(func_stringfunc)returns(FuncInfoinfo)authenticationoptional;

/*
*@deprecated
*/
funcdefget_all_func_info(modulenamemod)returns(list<FuncInfo>info)authenticationoptional;

/*
*Parameters for the grant_module_ownership function.
*
*Required arguments:
*modulename mod - the module to modify.
*username new_owner - the user to add to the module's list of
*owners.
*
*Optional arguments:
*boolean with_grant_option - true to allow the user to add owners
*to the module.
*/
typedefstructure{
modulenamemod;
usernamenew_owner;
booleanwith_grant_option;
}
GrantModuleOwnershipParams;

/*
*Grant ownership of a module. You must have grant ability on the
*module.
*/
funcdefgrant_module_ownership(GrantModuleOwnershipParamsparams)returns()authenticationrequired;

/*
*Parameters for the remove_module_ownership function.
*
*Required arguments:
*modulename mod - the module to modify.
*username old_owner - the user to remove from the module's list of
*owners.
*/
typedefstructure{
modulenamemod;
usernameold_owner;
}
RemoveModuleOwnershipParams;

/*
*Remove ownership from a current owner. You must have the grant ability
*on the module.
*/
funcdefremove_module_ownership(RemoveModuleOwnershipParamsparams)returns()authenticationrequired;

/*
*Parameters for list_all_types function.
*
*Optional arguments:
*boolean with_empty_modules - include empty module names, optional flag,
*default value is false.
*/
typedefstructure{
booleanwith_empty_modules;
}
ListAllTypesParams;

/*
*List all released types with released version from all modules. Return
*mapping from module name to mapping from type name to released type
*version.
*/
funcdeflist_all_types(ListAllTypesParamsparams)returns(mapping<modulename,mapping<typename,typever>>)authenticationoptional;

/*
*The results of the get_admin_role call.
*
*adminrole - the users's administration role, one of `none`, `read`, or `full`.
*/
typedefstructure{
stringadminrole;
}
GetAdminRoleResults;

/*
*Get the administrative role for the current user.
*/
funcdefget_admin_role()returns(GetAdminRoleResultsresults)authenticationrequired;

/*
*An object metadata update specification.
*
*Required arguments:
*ObjectIdentity oi - the object to be altered
*
*One or both of the following arguments are required:
*usermeta new - metadata to assign to the workspace. Duplicate keys will
*be overwritten.
*list<string> remove - these keys will be removed from the workspace
*metadata key/value pairs.
*/
typedefstructure{
ObjectIdentityoi;
usermetanew;
list<string>remove;
}
ObjectMetadataUpdate;

/*
*Input parameters for the alter_admin_object_metadata method.
*
*updates - the metadata updates to apply to the objects. If the same object is specified
*twice in the list, the update order is unspecified. At most 1000 updates are allowed
*in one call.
*/
typedefstructure{
list<ObjectMetadataUpdate>updates;
}
AlterAdminObjectMetadataParams;

/*
*Update admin metadata for an object. The user must have full workspace service
*administration privileges.
*/
funcdefalter_admin_object_metadata(AlterAdminObjectMetadataParamsparams)returns()authenticationrequired;

/*
*The administration interface.
*/
funcdefadminister(UnspecifiedObjectcommand)returns(UnspecifiedObjectresponse)authenticationrequired;
};

Function Index

administer
alter_admin_object_metadata
alter_workspace_metadata
clone_workspace
copy_object
create_workspace
delete_objects
delete_workspace
get_admin_role
get_all_func_info
get_all_type_info
get_func_info
get_jsonschema
get_module_info
get_names_by_prefix
get_object
get_object_history
get_object_info
get_object_info3
get_object_info_new
get_object_provenance
get_object_subset
get_objectmeta
get_objects
get_objects2
get_permissions
get_permissions_mass
get_referenced_objects
get_type_info
get_workspace_description
get_workspace_info
get_workspacemeta
grant_module_ownership
hide_objects
list_all_types
list_module_versions
list_modules
list_objects
list_referencing_object_counts
list_referencing_objects
list_workspace_ids
list_workspace_info
list_workspace_objects
list_workspaces
lock_workspace
register_typespec
register_typespec_copy
release_module
remove_module_ownership
rename_object
rename_workspace
request_module_ownership
revert_object
save_object
save_objects
set_global_permission
set_permissions
set_workspace_description
translate_from_MD5_types
translate_to_MD5_types
undelete_objects
unhide_objects
ver

Type Index

AlterAdminObjectMetadataParams
AlterWorkspaceMetadataParams
boolean
CloneWorkspaceParams
CopyObjectParams
CreateWorkspaceParams
epoch
ExternalDataUnit
extracted_id
func_string
FuncInfo
get_object_output
get_object_params
get_objectmeta_params
get_workspacemeta_params
GetAdminRoleResults
GetModuleInfoParams
GetNamesByPrefixParams
GetNamesByPrefixResults
GetObjectInfo3Params
GetObjectInfo3Results
GetObjectInfoNewParams
GetObjects2Params
GetObjects2Results
GetPermissionsMassParams
GrantModuleOwnershipParams
id_type
jsonschema
list_workspace_objects_params
list_workspaces_params
ListAllTypesParams
ListModulesParams
ListModuleVersionsParams
ListObjectsParams
ListWorkspaceIDsParams
ListWorkspaceIDsResults
ListWorkspaceInfoParams
lock_status
ModuleInfo
modulename
ModuleVersions
obj_id
obj_name
obj_ref
obj_ver
object_info
object_metadata
object_path
ObjectData
ObjectIdentity
ObjectInfo
ObjectMetadataUpdate
ObjectProvenanceInfo
ObjectSaveData
ObjectSpecification
permission
ProvenanceAction
ref_chain
ref_string
RegisterTypespecCopyParams
RegisterTypespecParams
RemoveModuleOwnershipParams
RenameObjectParams
RenameWorkspaceParams
save_object_params
SaveObjectsParams
SetGlobalPermissionsParams
SetPermissionsParams
SetWorkspaceDescriptionParams
spec_version
SubAction
SubObjectIdentity
timestamp
type_string
TypeInfo
typename
typespec
typever
usermeta
username
workspace_info
workspace_metadata
WorkspaceIdentity
WorkspacePermissions
ws_id
ws_name
\ No newline at end of file +Workspace
/*
*The Workspace Service (WSS) is primarily a language independent remote storage
*and retrieval system for KBase typed objects (TO) defined with the KBase
*Interface Description Language (KIDL). It has the following primary features:
*- Immutable storage of TOs with
*- user defined metadata
*- data provenance
*- Versioning of TOs
*- Referencing from TO to TO
*- Typechecking of all saved objects against a KIDL specification
*- Collecting typed objects into a workspace
*- Sharing workspaces with specific KBase users or the world
*- Freezing and publishing workspaces
*/
moduleWorkspace{

/*
*A boolean. 0 = false, other = true.
*/
typedefintboolean;

/*
*The unique, permanent numerical ID of a workspace.
*/
typedefintws_id;

/*
*A string used as a name for a workspace.
*Any string consisting of alphanumeric characters and "_", ".", or "-"
*that is not an integer is acceptable. The name may optionally be
*prefixed with the workspace owner's user name and a colon, e.g.
*kbasetest:my_workspace.
*/
typedefstringws_name;

/*
*Represents the permissions a user or users have to a workspace:
*
*'a' - administrator. All operations allowed.
*'w' - read/write.
*'r' - read.
*'n' - no permissions.
*/
typedefstringpermission;

/*
*Login name of a KBase user account.
*/
typedefstringusername;

/*
*A time in the format YYYY-MM-DDThh:mm:ssZ, where Z is either the
*character Z (representing the UTC timezone) or the difference
*in time to UTC in the format +/-HHMM, eg:
*2012-12-17T23:24:06-0500 (EST time)
*2013-04-03T08:56:32+0000 (UTC time)
*2013-04-03T08:56:32Z (UTC time)
*/
typedefstringtimestamp;

/*
*A Unix epoch (the time since 00:00:00 1/1/1970 UTC) in milliseconds.
*/
typedefintepoch;

/*
*A type string.
*Specifies the type and its version in a single string in the format
*[module].[typename]-[major].[minor]:
*
*module - a string. The module name of the typespec containing the type.
*typename - a string. The name of the type as assigned by the typedef
*statement.
*major - an integer. The major version of the type. A change in the
*major version implies the type has changed in a non-backwards
*compatible way.
*minor - an integer. The minor version of the type. A change in the
*minor version implies that the type has changed in a way that is
*backwards compatible with previous type definitions.
*
*In many cases, the major and minor versions are optional, and if not
*provided the most recent version will be used.
*
*Example: MyModule.MyType-3.1
*/
typedefstringtype_string;

/*
*An id type (e.g. from a typespec @id annotation: @id [idtype])
*/
typedefstringid_type;

/*
*An id extracted from an object.
*/
typedefstringextracted_id;

/*
*User provided metadata about an object.
*Arbitrary key-value pairs provided by the user.
*/
typedefmapping<string,string>usermeta;

/*
*The lock status of a workspace.
*One of 'unlocked', 'locked', or 'published'.
*/
typedefstringlock_status;

/*
*A workspace identifier.
*
*Select a workspace by one, and only one, of the numerical id or name.
*ws_id id - the numerical ID of the workspace.
*ws_name workspace - the name of the workspace.
*/
typedefstructure{
ws_nameworkspace;
ws_idid;
}
WorkspaceIdentity;

/*
*Meta data associated with a workspace. Provided for backwards
*compatibility. To be replaced by workspace_info.
*
*ws_name id - name of the workspace
*username owner - name of the user who owns (who created) this workspace
*timestamp moddate - date when the workspace was last modified
*int objects - the approximate number of objects currently stored in
*the workspace.
*permission user_permission - permissions for the currently logged in
*user for the workspace
*permission global_permission - default permissions for the workspace
*for all KBase users
*ws_id num_id - numerical ID of the workspace
*
*@deprecatedWorkspace.workspace_info
*/
typedeftuple<ws_nameid,usernameowner,timestampmoddate,intobjects,permissionuser_permission,permissionglobal_permission,ws_idnum_id>workspace_metadata;

/*
*Information about a workspace.
*
*ws_id id - the numerical ID of the workspace.
*ws_name workspace - name of the workspace.
*username owner - name of the user who owns (e.g. created) this workspace.
*timestamp moddate - date when the workspace was last modified.
*int max_objid - the maximum object ID appearing in this workspace.
*Since cloning a workspace preserves object IDs, this number may be
*greater than the number of objects in a newly cloned workspace.
*permission user_permission - permissions for the authenticated user of
*this workspace.
*permission globalread - whether this workspace is globally readable.
*lock_status lockstat - the status of the workspace lock.
*usermeta metadata - arbitrary user-supplied metadata about
*the workspace.
*/
typedeftuple<ws_idid,ws_nameworkspace,usernameowner,timestampmoddate,intmax_objid,permissionuser_permission,permissionglobalread,lock_statuslockstat,usermetametadata>workspace_info;

/*
*The unique, permanent numerical ID of an object.
*/
typedefintobj_id;

/*
*A string used as a name for an object.
*Any string consisting of alphanumeric characters and the characters
*|._- that is not an integer is acceptable.
*/
typedefstringobj_name;

/*
*An object version.
*The version of the object, starting at 1.
*/
typedefintobj_ver;

/*
*A string that uniquely identifies an object in the workspace service.
*
*The format is [ws_name or id]/[obj_name or id]/[obj_ver].
*For example, MyFirstWorkspace/MyFirstObject/3 would identify the third version
*of an object called MyFirstObject in the workspace called
*MyFirstWorkspace. 42/Panic/1 would identify the first version of
*the object name Panic in workspace with id 42. Towel/1/6 would
*identify the 6th version of the object with id 1 in the Towel
*workspace.If the version number is omitted, the latest version of
*the object is assumed.
*/
typedefstringobj_ref;

/*
*An object identifier.
*
*Select an object by either:
*One, and only one, of the numerical id or name of the workspace.
*ws_id wsid - the numerical ID of the workspace.
*ws_name workspace - the name of the workspace.
*AND
*One, and only one, of the numerical id or name of the object.
*obj_id objid- the numerical ID of the object.
*obj_name name - name of the object.
*OPTIONALLY
*obj_ver ver - the version of the object.
*OR an object reference string:
*obj_ref ref - an object reference string.
*/
typedefstructure{
ws_nameworkspace;
ws_idwsid;
obj_namename;
obj_idobjid;
obj_verver;
obj_refref;
}
ObjectIdentity;

/*
*A chain of objects with references to one another.
*
*An object reference chain consists of a list of objects where the nth
*object possesses a reference, either in the object itself or in the
*object provenance, to the n+1th object.
*/
typedeflist<ObjectIdentity>ref_chain;

/*
*A chain of objects with references to one another as a string.
*
*A single string that is semantically identical to ref_chain above.
*Represents a path from one workspace object to another through an
*arbitrarily number of intermediate objects where each object has a
*dependency or provenance reference to the next object. Each entry is
*an obj_ref as defined earlier. Entries are separated by semicolons.
*Whitespace is ignored.
*
*Examples:
*3/5/6; kbaseuser:myworkspace/myobject; 5/myobject/2
*aworkspace/6
*/
typedefstringref_string;

/*
*A path into an object.
*Identify a sub portion of an object by providing the path, delimited by
*a slash (/), to that portion of the object. Thus the path may not have
*slashes in the structure or mapping keys. Examples:
*/foo/bar/3 - specifies the bar key of the foo mapping and the 3rd
*entry of the array if bar maps to an array or the value mapped to
*the string "3" if bar maps to a map.
*/foo/bar/[*]/baz - specifies the baz field of all the objects in the
*list mapped by the bar key in the map foo.
*/foo/asterisk/baz - specifies the baz field of all the objects in the
*values of the foo mapping. Swap 'asterisk' for * in the path.
*In case you need to use '/' or '~' in path items use JSON Pointer
*notation defined here: http://tools.ietf.org/html/rfc6901
*/
typedefstringobject_path;

/*
*DEPRECATED
*
*An object subset identifier.
*
*Select a subset of an object by:
*EITHER
*One, and only one, of the numerical id or name of the workspace.
*ws_id wsid - the numerical ID of the workspace.
*ws_name workspace - name of the workspace.
*AND
*One, and only one, of the numerical id or name of the object.
*obj_id objid- the numerical ID of the object.
*obj_name name - name of the object.
*OPTIONALLY
*obj_ver ver - the version of the object.
*OR an object reference string:
*obj_ref ref - an object reference string.
*AND a subset specification:
*list<object_path> included - the portions of the object to include
*in the object subset.
*boolean strict_maps - if true, throw an exception if the subset
*specification traverses a non-existant map key (default false)
*boolean strict_arrays - if true, throw an exception if the subset
*specification exceeds the size of an array (default true)
*
*@deprecatedWorkspace.ObjectSpecification
*/
typedefstructure{
ws_nameworkspace;
ws_idwsid;
obj_namename;
obj_idobjid;
obj_verver;
obj_refref;
list<object_path>included;
booleanstrict_maps;
booleanstrict_arrays;
}
SubObjectIdentity;

/*
*An Object Specification (OS). Inherits from ObjectIdentity (OI).
*Specifies which object, and which parts of that object, to retrieve
*from the Workspace Service.
*
*The fields wsid, workspace, objid, name, and ver are identical to
*the OI fields.
*
*The ref field's behavior is extended from OI. It maintains its
*previous behavior, but now also can act as a reference string. See
*reference following below for more information.
*
*REFERENCE FOLLOWING:
*
*Reference following guarantees that a user that has access to an
*object can always see a) objects that are referenced inside the object
*and b) objects that are referenced in the object's provenance. This
*ensures that the user has visibility into the entire provenance of the
*object and the object's object dependencies (e.g. references).
*
*The user must have at least read access to the object specified in this
*SO, but need not have access to any further objects in the reference
*chain, and those objects may be deleted.
*
*Optional reference following fields:
*Note that only one of the following fields may be specified.
*
*ref_chain obj_path - a path to the desired object from the object
*specified in this OS. In other words, the object specified in this
*OS is assumed to be accessible to the user, and the objects in
*the object path represent a chain of references to the desired
*object at the end of the object path. If the references are all
*valid, the desired object will be returned.
*- OR -
*list<obj_ref> obj_ref_path - shorthand for the obj_path.
*- OR -
*ref_chain to_obj_path - identical to obj_path, except that the path
*is TO the object specified in this OS, rather than from the object.
*In other words the object specified by wsid/objid/ref etc. is the
*end of the path, and to_obj_path is the rest of the path. The user
*must have access to the first object in the to_obj_path.
*- OR -
*list<obj_ref> to_obj_ref_path - shorthand for the to_obj_path.
*- OR -
*ref_string ref - A string representing a reference path from
*one object to another. Unlike the previous reference following
*options, the ref_string represents the ENTIRE path from the source
*object to the target object. As with the OI object, the ref field
*may contain a single reference.
*- OR -
*boolean find_refence_path - This is the last, slowest, and most expensive resort
*for getting a referenced object - do not use this method unless the
*path to the object is unavailable by any other means. Setting the
*find_refence_path parameter to true means that the workspace service will
*search through the object reference graph from the object specified
*in this OS to find an object that 1) the user can access, and 2)
*has an unbroken reference path to the target object. If the search
*succeeds, the object will be returned as normal. Note that the search
*will automatically fail after a certain (but much larger than necessary
*for the vast majority of cases) number of objects are traversed.
*
*
*OBJECT SUBSETS:
*
*When selecting a subset of an array in an object, the returned
*array is compressed to the size of the subset, but the ordering of
*the array is maintained. For example, if the array stored at the
*'feature' key of a Genome object has 4000 entries, and the object paths
*provided are:
*/feature/7
*/feature/3015
*/feature/700
*The returned feature array will be of length three and the entries will
*consist, in order, of the 7th, 700th, and 3015th entries of the
*original array.
*
*Optional object subset fields:
*list<object_path> included - the portions of the object to include
*in the object subset.
*boolean strict_maps - if true, throw an exception if the subset
*specification traverses a non-existent map key (default false)
*boolean strict_arrays - if true, throw an exception if the subset
*specification exceeds the size of an array (default true)
*/
typedefstructure{
ws_nameworkspace;
ws_idwsid;
obj_namename;
obj_idobjid;
obj_verver;
ref_stringref;
ref_chainobj_path;
list<obj_ref>obj_ref_path;
ref_chainto_obj_path;
list<obj_ref>to_obj_ref_path;
booleanfind_reference_path;
list<object_path>included;
booleanstrict_maps;
booleanstrict_arrays;
}
ObjectSpecification;

/*
*Meta data associated with an object stored in a workspace. Provided for
*backwards compatibility.
*
*obj_name id - name of the object.
*type_string type - type of the object.
*timestamp moddate - date when the object was saved
*obj_ver instance - the version of the object
*string command - Deprecated. Always returns the empty string.
*username lastmodifier - name of the user who last saved the object,
*including copying the object
*username owner - Deprecated. Same as lastmodifier.
*ws_name workspace - name of the workspace in which the object is
*stored
*string ref - Deprecated. Always returns the empty string.
*string chsum - the md5 checksum of the object.
*usermeta metadata - arbitrary user-supplied metadata about
*the object.
*obj_id objid - the numerical id of the object.
*
*@deprecatedobject_info
*/
typedeftuple<obj_nameid,type_stringtype,timestampmoddate,intinstance,stringcommand,usernamelastmodifier,usernameowner,ws_nameworkspace,stringref,stringchsum,usermetametadata,obj_idobjid>object_metadata;

/*
*Information about an object, including user provided metadata.
*
*obj_id objid - the numerical id of the object.
*obj_name name - the name of the object.
*type_string type - the type of the object.
*timestamp save_date - the save date of the object.
*obj_ver ver - the version of the object.
*username saved_by - the user that saved or copied the object.
*ws_id wsid - the workspace containing the object.
*ws_name workspace - the workspace containing the object.
*string chsum - the md5 checksum of the object.
*int size - the size of the object in bytes.
*usermeta meta - arbitrary user-supplied metadata about
*the object.
*/
typedeftuple<obj_idobjid,obj_namename,type_stringtype,timestampsave_date,intversion,usernamesaved_by,ws_idwsid,ws_nameworkspace,stringchsum,intsize,usermetameta>object_info;

/*
*Information about an object as a struct rather than a tuple.
*This allows adding fields in a backward compatible way in the future.
*Includes more fields than object_info.
*
*obj_id objid - the numerical id of the object.
*obj_name name - the name of the object.
*type_string type - the type of the object.
*timestamp save_date - the save date of the object.
*obj_ver ver - the version of the object.
*username saved_by - the user that saved or copied the object.
*ws_id wsid - the workspace containing the object.
*ws_name workspace - the workspace containing the object.
*string chsum - the md5 checksum of the object.
*int size - the size of the object in bytes.
*usermeta meta - arbitrary user-supplied metadata about the object.
*usermeta adminmeta - service administrator metadata set on an object. Unlike most
*other object fields, admin metadata is mutable.
*list<obj_ref> path - the path to the object.
*/
typedefstructure{
obj_idobjid;
obj_namename;
type_stringtype;
timestampsave_date;
intversion;
usernamesaved_by;
ws_idwsid;
ws_nameworkspace;
stringchsum;
intsize;
usermetameta;
usermetaadminmeta;
list<obj_ref>path;
}
ObjectInfo;

/*
*An external data unit. A piece of data from a source outside the
*Workspace.
*
*On input, only one of the resource_release_date or
*resource_release_epoch may be supplied. Both are supplied on output.
*
*All fields are optional, but at least one field must be present.
*
*string resource_name - the name of the resource, for example JGI.
*string resource_url - the url of the resource, for example
*http://genome.jgi.doe.gov
*string resource_version - version of the resource
*timestamp resource_release_date - the release date of the resource
*epoch resource_release_epoch - the release date of the resource
*string data_url - the url of the data, for example
*http://genome.jgi.doe.gov/pages/dynamicOrganismDownload.jsf?
*organism=BlaspURHD0036
*string data_id - the id of the data, for example
*7625.2.79179.AGTTCC.adnq.fastq.gz
*string description - a free text description of the data.
*/
typedefstructure{
stringresource_name;
stringresource_url;
stringresource_version;
timestampresource_release_date;
epochresource_release_epoch;
stringdata_url;
stringdata_id;
stringdescription;
}
ExternalDataUnit;

/*
*Information about a subaction that is invoked by a provenance action.
*
*A provenance action (PA) may invoke subactions (SA), e.g. calling a
*separate piece of code, a service, or a script. In most cases these
*calls are the same from PA to PA and so do not need to be listed in
*the provenance since providing information about the PA alone provides
*reproducibility.
*
*In some cases, however, SAs may change over time, such that invoking
*the same PA with the same parameters may produce different results.
*For example, if a PA calls a remote server, that server may be updated
*between a PA invoked on day T and another PA invoked on day T+1.
*
*The SubAction structure allows for specifying information about SAs
*that may dynamically change from PA invocation to PA invocation.
*
*All fields are optional but at least one field must be present.
*
*string name - the name of the SA.
*string ver - the version of SA.
*string code_url - a url pointing to the SA's codebase.
*string commit - a version control commit ID for the SA.
*string endpoint_url - a url pointing to the access point for the SA -
*a server url, for instance.
*/
typedefstructure{
stringname;
stringver;
stringcode_url;
stringcommit;
stringendpoint_url;
}
SubAction;

/*
*A provenance action.
*
*A provenance action (PA) is an action taken while transforming one data
*object to another. There may be several PAs taken in series. A PA is
*typically running a script, running an api command, etc. All of the
*following fields are optional, but more information provided equates to
*better data provenance.
*
*If a provenance action has no fields defined at all, it is silently dropped from
*the list.
*
*resolved_ws_objects should never be set by the user; it is set by the
*workspace service when returning data.
*
*On input, only one of the time or epoch may be supplied. Both are
*supplied on output.
*
*The maximum size of the entire provenance object, including all actions,
*is 1MB.
*
*timestamp time - the time the action was started
*epoch epoch - the time the action was started.
*string caller - the name or id of the invoker of this provenance
*action. In most cases, this will be the same for all PAs.
*string service - the name of the service that performed this action.
*string service_ver - the version of the service that performed this action.
*string method - the method of the service that performed this action.
*list<UnspecifiedObject> method_params - the parameters of the method
*that performed this action. If an object in the parameters is a
*workspace object, also put the object reference in the
*input_ws_object list.
*string script - the name of the script that performed this action.
*string script_ver - the version of the script that performed this action.
*string script_command_line - the command line provided to the script
*that performed this action. If workspace objects were provided in
*the command line, also put the object reference in the
*input_ws_object list.
*list<ref_string> input_ws_objects - the workspace objects that
*were used as input to this action; typically these will also be
*present as parts of the method_params or the script_command_line
*arguments. A reference path into the object graph may be supplied.
*list<obj_ref> resolved_ws_objects - the workspace objects ids from
*input_ws_objects resolved to permanent workspace object references
*by the workspace service.
*list<string> intermediate_incoming - if the previous action produced
*output that 1) was not stored in a referrable way, and 2) is
*used as input for this action, provide it with an arbitrary and
*unique ID here, in the order of the input arguments to this action.
*These IDs can be used in the method_params argument.
*list<string> intermediate_outgoing - if this action produced output
*that 1) was not stored in a referrable way, and 2) is
*used as input for the next action, provide it with an arbitrary and
*unique ID here, in the order of the output values from this action.
*These IDs can be used in the intermediate_incoming argument in the
*next action.
*list<ExternalDataUnit> external_data - data external to the workspace
*that was either imported to the workspace or used to create a
*workspace object.
*list<SubAction> subactions - the subactions taken as a part of this
*action.
*mapping<string, string> custom - user definable custom provenance
*fields and their values.
*string description - a free text description of this action.
*/
typedefstructure{
timestamptime;
epochepoch;
stringcaller;
stringservice;
stringservice_ver;
stringmethod;
list<UnspecifiedObject>method_params;
stringscript;
stringscript_ver;
stringscript_command_line;
list<ref_string>input_ws_objects;
list<obj_ref>resolved_ws_objects;
list<string>intermediate_incoming;
list<string>intermediate_outgoing;
list<ExternalDataUnit>external_data;
list<SubAction>subactions;
mapping<string,string>custom;
stringdescription;
}
ProvenanceAction;

/*
*Returns the version of the workspace service.
*/
funcdefver()returns(stringver)authenticationnone;

/*
*Input parameters for the "create_workspace" function.
*
*Required arguments:
*ws_name workspace - name of the workspace to be created.
*
*Optional arguments:
*permission globalread - 'r' to set the new workspace globally readable,
*default 'n'.
*string description - A free-text description of the new workspace, 1000
*characters max. Longer strings will be mercilessly and brutally
*truncated.
*usermeta meta - arbitrary user-supplied metadata for the workspace.
*/
typedefstructure{
ws_nameworkspace;
permissionglobalread;
stringdescription;
usermetameta;
}
CreateWorkspaceParams;

/*
*Creates a new workspace.
*/
funcdefcreate_workspace(CreateWorkspaceParamsparams)returns(workspace_infoinfo)authenticationrequired;

/*
*Input parameters for the "alter_workspace_metadata" function.
*
*Required arguments:
*WorkspaceIdentity wsi - the workspace to be altered
*
*One or both of the following arguments are required:
*usermeta new - metadata to assign to the workspace. Duplicate keys will
*be overwritten.
*list<string> remove - these keys will be removed from the workspace
*metadata key/value pairs.
*/
typedefstructure{
WorkspaceIdentitywsi;
usermetanew;
list<string>remove;
}
AlterWorkspaceMetadataParams;

/*
*Change the metadata associated with a workspace.
*/
funcdefalter_workspace_metadata(AlterWorkspaceMetadataParamsparams)returns()authenticationrequired;

/*
*Input parameters for the "clone_workspace" function.
*
*Note that deleted objects are not cloned, although hidden objects are
*and remain hidden in the new workspace.
*
*Required arguments:
*WorkspaceIdentity wsi - the workspace to be cloned.
*ws_name workspace - name of the workspace to be cloned into. This must
*be a non-existant workspace name.
*
*Optional arguments:
*permission globalread - 'r' to set the new workspace globally readable,
*default 'n'.
*string description - A free-text description of the new workspace, 1000
*characters max. Longer strings will be mercilessly and brutally
*truncated.
*usermeta meta - arbitrary user-supplied metadata for the workspace.
*list<ObjectIdentity> exclude - exclude the specified objects from the
*cloned workspace. Either an object ID or a object name must be
*specified in each ObjectIdentity - any supplied reference strings,
*workspace names or IDs, and versions are ignored.
*/
typedefstructure{
WorkspaceIdentitywsi;
ws_nameworkspace;
permissionglobalread;
stringdescription;
usermetameta;
list<ObjectIdentity>exclude;
}
CloneWorkspaceParams;

/*
*Clones a workspace.
*/
funcdefclone_workspace(CloneWorkspaceParamsparams)returns(workspace_infoinfo)authenticationrequired;

/*
*Lock a workspace, preventing further changes.
*
*WARNING: Locking a workspace is permanent. A workspace, once locked,
*cannot be unlocked.
*
*The only changes allowed for a locked workspace are changing user
*based permissions or making a private workspace globally readable,
*thus permanently publishing the workspace. A locked, globally readable
*workspace cannot be made private.
*/
funcdeflock_workspace(WorkspaceIdentitywsi)returns(workspace_infoinfo)authenticationrequired;

/*
*DEPRECATED
*
*Input parameters for the "get_workspacemeta" function. Provided for
*backwards compatibility.
*
*One, and only one of:
*ws_name workspace - name of the workspace.
*ws_id id - the numerical ID of the workspace.
*
*Optional arguments:
*string auth - the authentication token of the KBase account accessing
*the workspace. Overrides the client provided authorization
*credentials if they exist.
*
*@deprecatedWorkspace.WorkspaceIdentity
*/
typedefstructure{
ws_nameworkspace;
ws_idid;
stringauth;
}
get_workspacemeta_params;

/*
*Retrieves the metadata associated with the specified workspace.
*Provided for backwards compatibility.
*@deprecatedWorkspace.get_workspace_info
*/
funcdefget_workspacemeta(get_workspacemeta_paramsparams)returns(workspace_metadatametadata)authenticationoptional;

/*
*Get information associated with a workspace.
*/
funcdefget_workspace_info(WorkspaceIdentitywsi)returns(workspace_infoinfo)authenticationoptional;

/*
*Get a workspace's description.
*/
funcdefget_workspace_description(WorkspaceIdentitywsi)returns(stringdescription)authenticationoptional;

/*
*Input parameters for the "set_permissions" function.
*
*One, and only one, of the following is required:
*ws_id id - the numerical ID of the workspace.
*ws_name workspace - the name of the workspace.
*
*Required arguments:
*permission new_permission - the permission to assign to the users.
*list<username> users - the users whose permissions will be altered.
*/
typedefstructure{
ws_nameworkspace;
ws_idid;
permissionnew_permission;
list<username>users;
}
SetPermissionsParams;

/*
*Set permissions for a workspace.
*/
funcdefset_permissions(SetPermissionsParamsparams)returns()authenticationrequired;

/*
*Input parameters for the "set_global_permission" function.
*
*One, and only one, of the following is required:
*ws_id id - the numerical ID of the workspace.
*ws_name workspace - the name of the workspace.
*
*Required arguments:
*permission new_permission - the permission to assign to all users,
*either 'n' or 'r'. 'r' means that all users will be able to read
*the workspace; otherwise users must have specific permission to
*access the workspace.
*/
typedefstructure{
ws_nameworkspace;
ws_idid;
permissionnew_permission;
}
SetGlobalPermissionsParams;

/*
*Set the global permission for a workspace.
*/
funcdefset_global_permission(SetGlobalPermissionsParamsparams)returns()authenticationrequired;

/*
*Input parameters for the "set_workspace_description" function.
*
*One, and only one, of the following is required:
*ws_id id - the numerical ID of the workspace.
*ws_name workspace - the name of the workspace.
*
*Optional arguments:
*string description - A free-text description of the workspace, 1000
*characters max. Longer strings will be mercilessly and brutally
*truncated. If omitted, the description is set to null.
*/
typedefstructure{
ws_nameworkspace;
ws_idid;
stringdescription;
}
SetWorkspaceDescriptionParams;

/*
*Set the description for a workspace.
*/
funcdefset_workspace_description(SetWorkspaceDescriptionParamsparams)returns()authenticationrequired;

/*
*Input parameters for the "get_permissions_mass" function.
*workspaces - the workspaces for which to return the permissions,
*maximum 1000.
*/
typedefstructure{
list<WorkspaceIdentity>workspaces;
}
GetPermissionsMassParams;

/*
*A set of workspace permissions.
*perms - the list of permissions for each requested workspace
*/
typedefstructure{
list<mapping<username,permission>>perms;
}
WorkspacePermissions;

/*
*Get permissions for multiple workspaces.
*/
funcdefget_permissions_mass(GetPermissionsMassParamsmass)returns(WorkspacePermissionsperms)authenticationoptional;

/*
*Get permissions for a workspace.
*@deprecatedget_permissions_mass
*/
funcdefget_permissions(WorkspaceIdentitywsi)returns(mapping<username,permission>perms)authenticationoptional;

/*
*Input parameters for the "save_object" function. Provided for backwards
*compatibility.
*
*Required arguments:
*type_string type - type of the object to be saved
*ws_name workspace - name of the workspace where the object is to be
*saved
*obj_name id - name behind which the object will be saved in the
*workspace
*UnspecifiedObject data - data to be saved in the workspace
*
*Optional arguments:
*usermeta metadata - arbitrary user-supplied metadata for the object,
*not to exceed 16kb; if the object type specifies automatic
*metadata extraction with the 'meta ws' annotation, and your
*metadata name conflicts, then your metadata will be silently
*overwritten.
*string auth - the authentication token of the KBase account accessing
*the workspace. Overrides the client provided authorization
*credentials if they exist.
*
*@deprecated
*/
typedefstructure{
obj_nameid;
type_stringtype;
UnspecifiedObjectdata;
ws_nameworkspace;
mapping<string,string>metadata;
stringauth;
}
save_object_params;

/*
*Saves the input object data and metadata into the selected workspace,
*returning the object_metadata of the saved object. Provided
*for backwards compatibility.
*
*@deprecatedWorkspace.save_objects
*/
funcdefsave_object(save_object_paramsparams)returns(object_metadatametadata)authenticationoptional;

/*
*An object and associated data required for saving.
*
*Required arguments:
*type_string type - the type of the object. Omit the version information
*to use the latest version.
*UnspecifiedObject data - the object data.
*One, and only one, of:
*obj_name name - the name of the object.
*obj_id objid - the id of the object to save over.
*
*
*Optional arguments:
*usermeta meta - arbitrary user-supplied metadata for the object,
*not to exceed 16kb; if the object type specifies automatic
*metadata extraction with the 'meta ws' annotation, and your
*metadata name conflicts, then your metadata will be silently
*overwritten.
*list<ProvenanceAction> provenance - provenance data for the object.
*boolean hidden - true if this object should not be listed when listing
*workspace objects.
*/
typedefstructure{
type_stringtype;
UnspecifiedObjectdata;
obj_namename;
obj_idobjid;
usermetameta;
list<ProvenanceAction>provenance;
booleanhidden;
}
ObjectSaveData;

/*
*Input parameters for the "save_objects" function.
*
*One, and only one, of the following is required:
*ws_id id - the numerical ID of the workspace.
*ws_name workspace - the name of the workspace.
*
*Required arguments:
*list<ObjectSaveData> objects - the objects to save.
*/
typedefstructure{
ws_nameworkspace;
ws_idid;
list<ObjectSaveData>objects;
}
SaveObjectsParams;

/*
*Save objects to the workspace. Saving over a deleted object undeletes
*it.
*/
funcdefsave_objects(SaveObjectsParamsparams)returns(list<object_info>info)authenticationrequired;

/*
*Input parameters for the "get_object" function. Provided for backwards
*compatibility.
*
*Required arguments:
*ws_name workspace - Name of the workspace containing the object to be
*retrieved
*obj_name id - Name of the object to be retrieved
*
*Optional arguments:
*int instance - Version of the object to be retrieved, enabling
*retrieval of any previous version of an object
*string auth - the authentication token of the KBase account accessing
*the object. Overrides the client provided authorization
*credentials if they exist.
*
*@deprecatedWorkspace.ObjectIdentity
*/
typedefstructure{
obj_nameid;
ws_nameworkspace;
intinstance;
stringauth;
}
get_object_params;

/*
*Output generated by the "get_object" function. Provided for backwards
*compatibility.
*
*UnspecifiedObject data - The object's data.
*object_metadata metadata - Metadata for object retrieved/
*
*@deprecatedWorkspace.ObjectData
*/
typedefstructure{
UnspecifiedObjectdata;
object_metadatametadata;
}
get_object_output;

/*
*Retrieves the specified object from the specified workspace.
*Both the object data and metadata are returned.
*Provided for backwards compatibility.
*
*@deprecatedWorkspace.get_objects
*/
funcdefget_object(get_object_paramsparams)returns(get_object_outputoutput)authenticationoptional;

/*
*DEPRECATED
*
*The provenance and supplemental info for an object.
*
*object_info info - information about the object.
*list<ProvenanceAction> provenance - the object's provenance.
*username creator - the user that first saved the object to the
*workspace.
*ws_id orig_wsid - the id of the workspace in which this object was
*originally saved. Missing for objects saved prior to version
*0.4.1.
*timestamp created - the date the object was first saved to the
*workspace.
*epoch epoch - the date the object was first saved to the
*workspace.
*list<obj_ref> - the references contained within the object.
*obj_ref copied - the reference of the source object if this object is
*a copy and the copy source exists and is accessible.
*null otherwise.
*boolean copy_source_inaccessible - true if the object was copied from
*another object, but that object is no longer accessible to the
*user. False otherwise.
*mapping<id_type, list<extracted_id>> extracted_ids - any ids extracted
*from the object.
*string handle_error - if an error occurs while setting ACLs on
*embedded external IDs, it will be reported here. If not for historical reasons the
*parameter would be called "external_id_error".
*string handle_stacktrace - the stacktrace for handle_error. As above, the parameter
*should be called "external_id_stacktrace".
*
*@deprecated
*/
typedefstructure{
object_infoinfo;
list<ProvenanceAction>provenance;
usernamecreator;
ws_idorig_wsid;
timestampcreated;
epochepoch;
list<obj_ref>refs;
obj_refcopied;
booleancopy_source_inaccessible;
mapping<id_type,list<extracted_id>>extracted_ids;
stringhandle_error;
stringhandle_stacktrace;
}
ObjectProvenanceInfo;

/*
*DEPRECATED
*Get object provenance from the workspace.
*
*@deprecatedWorkspace.get_objects2
*/
funcdefget_object_provenance(list<ObjectIdentity>object_ids)returns(list<ObjectProvenanceInfo>data)authenticationoptional;

/*
*The data and supplemental info for an object.
*
*UnspecifiedObject data - the object's data or subset data.
*object_info info - information about the object.
*ObjectInfo infostruct - information about the object as a structure rather than a tuple.
*list<obj_ref> path - the path to the object through the object reference graph. All the
*references in the path are absolute.
*list<ProvenanceAction> provenance - the object's provenance.
*username creator - the user that first saved the object to the workspace.
*ws_id orig_wsid - the id of the workspace in which this object was
*originally saved. Missing for objects saved prior to version
*0.4.1.
*timestamp created - the date the object was first saved to the
*workspace.
*epoch epoch - the date the object was first saved to the
*workspace.
*list<obj_ref> refs - the references contained within the object.
*obj_ref copied - the reference of the source object if this object is
*a copy and the copy source exists and is accessible.
*null otherwise.
*boolean copy_source_inaccessible - true if the object was copied from
*another object, but that object is no longer accessible to the
*user. False otherwise.
*mapping<id_type, list<extracted_id>> extracted_ids - any ids extracted
*from the object.
*string handle_error - if an error occurs while setting ACLs on
*embedded external IDs, it will be reported here. If not for historical reasons the
*parameter would be called "external_id_error".
*string handle_stacktrace - the stacktrace for handle_error. As above, the parameter
*should be called "external_id_stacktrace".
*/
typedefstructure{
UnspecifiedObjectdata;
object_infoinfo;
ObjectInfoinfostruct;
list<obj_ref>path;
list<ProvenanceAction>provenance;
usernamecreator;
ws_idorig_wsid;
timestampcreated;
epochepoch;
list<obj_ref>refs;
obj_refcopied;
booleancopy_source_inaccessible;
mapping<id_type,list<extracted_id>>extracted_ids;
stringhandle_error;
stringhandle_stacktrace;
}
ObjectData;

/*
*DEPRECATED
*Get objects from the workspace.
*@deprecatedWorkspace.get_objects2
*/
funcdefget_objects(list<ObjectIdentity>object_ids)returns(list<ObjectData>data)authenticationoptional;

/*
*Input parameters for the get_objects2 function.
*
*Required parameters:
*list<ObjectSpecification> objects - the list of object specifications
*for the objects to return (via reference chain and as a subset if
*specified).
*
*Optional parameters:
*boolean ignoreErrors - Don't throw an exception if an object cannot
*be accessed; return null for that object's information instead.
*Default false.
*boolean infostruct - return the object information as a structure rather than a tuple.
*Default false. If true, ObjectData.path will be null as it is provided in
*the ObjectInfo data.
*boolean no_data - return the provenance, references, and
*object_info for this object without the object data. Default false.
*boolean skip_external_system_updates - if the objects contain any external IDs, don't
*contact external systems to perform any updates for those IDs (often ACL updates,
*e.g. for handle / blobstore / sample IDs). In some cases this can speed up fetching the
*data. Default false.
*boolean batch_external_system_updates - if the objects contain any external IDs,
*send all external system updates in a batch to each external system when possible
*rather than object by object. This can potentially speed up the updates, but the
*drawback is that if the external update fails for any object, all the objects that
*required updates for that system will be marked as having a failed update.
*Has no effect if skip_external_system_updates is true. Default false.
*/
typedefstructure{
list<ObjectSpecification>objects;
booleanignoreErrors;
booleaninfostruct;
booleanno_data;
booleanskip_external_system_updates;
booleanbatch_external_system_updates;
}
GetObjects2Params;

/*
*Results from the get_objects2 function.
*
*list<ObjectData> data - the returned objects.
*/
typedefstructure{
list<ObjectData>data;
}
GetObjects2Results;

/*
*Get objects from the workspace.
*/
funcdefget_objects2(GetObjects2Paramsparams)returns(GetObjects2Resultsresults)authenticationoptional;

/*
*DEPRECATED
*Get portions of objects from the workspace.
*
*When selecting a subset of an array in an object, the returned
*array is compressed to the size of the subset, but the ordering of
*the array is maintained. For example, if the array stored at the
*'feature' key of a Genome object has 4000 entries, and the object paths
*provided are:
*/feature/7
*/feature/3015
*/feature/700
*The returned feature array will be of length three and the entries will
*consist, in order, of the 7th, 700th, and 3015th entries of the
*original array.
*@deprecatedWorkspace.get_objects2
*/
funcdefget_object_subset(list<SubObjectIdentity>sub_object_ids)returns(list<ObjectData>data)authenticationoptional;

/*
*Get an object's history. The version argument of the ObjectIdentity is
*ignored.
*/
funcdefget_object_history(ObjectIdentityobject)returns(list<object_info>history)authenticationoptional;

/*
*List objects that reference one or more specified objects. References
*in the deleted state are not returned.
*/
funcdeflist_referencing_objects(list<ObjectIdentity>object_ids)returns(list<list<object_info>>referrers)authenticationoptional;

/*
*DEPRECATED
*
*List the number of times objects have been referenced.
*
*This count includes both provenance and object-to-object references
*and, unlike list_referencing_objects, includes objects that are
*inaccessible to the user.
*
*@deprecated
*/
funcdeflist_referencing_object_counts(list<ObjectIdentity>object_ids)returns(list<int>counts)authenticationoptional;

/*
*DEPRECATED
*
*Get objects by references from other objects.
*
*NOTE: In the vast majority of cases, this method is not necessary and
*get_objects should be used instead.
*
*get_referenced_objects guarantees that a user that has access to an
*object can always see a) objects that are referenced inside the object
*and b) objects that are referenced in the object's provenance. This
*ensures that the user has visibility into the entire provenance of the
*object and the object's object dependencies (e.g. references).
*
*The user must have at least read access to the first object in each
*reference chain, but need not have access to any further objects in
*the chain, and those objects may be deleted.
*
*@deprecatedWorkspace.get_objects2
*/
funcdefget_referenced_objects(list<ref_chain>ref_chains)returns(list<ObjectData>data)authenticationoptional;

/*
*Input parameters for the "list_workspaces" function. Provided for
*backwards compatibility.
*
*Optional parameters:
*string auth - the authentication token of the KBase account accessing
*the list of workspaces. Overrides the client provided authorization
*credentials if they exist.
*boolean excludeGlobal - if excludeGlobal is true exclude world
*readable workspaces. Defaults to false.
*
*@deprecatedWorkspace.ListWorkspaceInfoParams
*/
typedefstructure{
stringauth;
booleanexcludeGlobal;
}
list_workspaces_params;

/*
*Lists the metadata of all workspaces a user has access to. Provided for
*backwards compatibility - to be replaced by the functionality of
*list_workspace_info
*
*@deprecatedWorkspace.list_workspace_info
*/
funcdeflist_workspaces(list_workspaces_paramsparams)returns(list<workspace_metadata>workspaces)authenticationoptional;

/*
*Input parameters for the "list_workspace_info" function.
*
*Only one of each timestamp/epoch pair may be supplied.
*
*Optional parameters:
*permission perm - filter workspaces by minimum permission level. 'None'
*and 'readable' are ignored.
*list<username> owners - filter workspaces by owner.
*usermeta meta - filter workspaces by the user supplied metadata. NOTE:
*only one key/value pair is supported at this time. A full map
*is provided as input for the possibility for expansion in the
*future.
*timestamp after - only return workspaces that were modified after this
*date.
*timestamp before - only return workspaces that were modified before
*this date.
*epoch after_epoch - only return workspaces that were modified after
*this date.
*epoch before_epoch - only return workspaces that were modified before
*this date.
*boolean excludeGlobal - if excludeGlobal is true exclude world
*readable workspaces. Defaults to false.
*boolean showDeleted - show deleted workspaces that are owned by the
*user.
*boolean showOnlyDeleted - only show deleted workspaces that are owned
*by the user.
*/
typedefstructure{
permissionperm;
list<username>owners;
usermetameta;
timestampafter;
timestampbefore;
epochafter_epoch;
epochbefore_epoch;
booleanexcludeGlobal;
booleanshowDeleted;
booleanshowOnlyDeleted;
}
ListWorkspaceInfoParams;

/*
*List workspaces viewable by the user.
*/
funcdeflist_workspace_info(ListWorkspaceInfoParamsparams)returns(list<workspace_info>wsinfo)authenticationoptional;

/*
*Input parameters for the "list_workspace_ids" function.
*
*Optional parameters:
*permission perm - filter workspaces by minimum permission level. 'None'
*and 'readable' are ignored.
*boolean onlyGlobal - if onlyGlobal is true only include world readable
*workspaces. Defaults to false. If true, excludeGlobal is ignored.
*boolean excludeGlobal - if excludeGlobal is true exclude world
*readable workspaces. Defaults to true.
*/
typedefstructure{
permissionperm;
booleanexcludeGlobal;
booleanonlyGlobal;
}
ListWorkspaceIDsParams;

/*
*Results of the "list_workspace_ids" function.
*
*list<int> workspaces - the workspaces to which the user has explicit
*access.
*list<int> pub - the workspaces to which the user has access because
*they're globally readable.
*/
typedefstructure{
list<int>workspaces;
list<int>pub;
}
ListWorkspaceIDsResults;

/*
*List workspace IDs to which the user has access.
*
*This function returns a subset of the information in the
*list_workspace_info method and should be substantially faster.
*/
funcdeflist_workspace_ids(ListWorkspaceIDsParamsparams)returns(ListWorkspaceIDsResultsresults)authenticationoptional;

/*
*Input parameters for the "list_workspace_objects" function. Provided
*for backwards compatibility.
*
*Required arguments:
*ws_name workspace - Name of the workspace for which objects should be
*listed
*
*Optional arguments:
*type_string type - type of the objects to be listed. Here, omitting
*version information will find any objects that match the provided
*type - e.g. Foo.Bar-0 will match Foo.Bar-0.X where X is any
*existing version.
*boolean showDeletedObject - show objects that have been deleted
*string auth - the authentication token of the KBase account requesting
*access. Overrides the client provided authorization credentials if
*they exist.
*
*@deprecatedWorkspace.ListObjectsParams
*/
typedefstructure{
ws_nameworkspace;
type_stringtype;
booleanshowDeletedObject;
stringauth;
}
list_workspace_objects_params;

/*
*Lists the metadata of all objects in the specified workspace with the
*specified type (or with any type). Provided for backwards compatibility.
*
*@deprecatedWorkspace.list_objects
*/
funcdeflist_workspace_objects(list_workspace_objects_paramsparams)returns(list<object_metadata>objects)authenticationoptional;

/*
*Parameters for the 'list_objects' function.
*
*At least one, and no more than 10000, workspaces must be specified in one of the
*two following parameters. It is strongly recommended that the list is restricted to
*the workspaces of interest, or the results may be very large:
*list<ws_id> ids - the numerical IDs of the workspaces of interest.
*list<ws_name> workspaces - the names of the workspaces of interest.
*
*Only one of each timestamp/epoch pair may be supplied.
*
*Optional arguments:
*type_string type - type of the objects to be listed. Here, omitting
*version information will find any objects that match the provided
*type - e.g. Foo.Bar-0 will match Foo.Bar-0.X where X is any
*existing version.
*permission perm - DEPRECATED, no longer useful. Filter on minimum permission by providing
*only workspaces with the desired permission levels in the input list(s).
*list<username> savedby - filter objects by the user that saved or
*copied the object.
*usermeta meta - filter objects by the user supplied metadata. NOTE:
*only one key/value pair is supported at this time. A full map
*is provided as input for the possibility for expansion in the
*future.
*timestamp after - only return objects that were created after this
*date.
*timestamp before - only return objects that were created before this
*date.
*epoch after_epoch - only return objects that were created after this
*date.
*epoch before_epoch - only return objects that were created before this
*date.
*string startafter - a reference-like string that determines where the
*list of objects will begin. It takes the form X/Y/Z, where X is
*the workspace ID, Y the object ID, and Z the version. The version
*may be omitted, and the object ID omitted if the version is also
*omitted. After a '/' separator either an integer or no characters
*at all, including whitespace, may occur. Whitespace strings are
*ignored. If startafter is provided, after, before,
*after_epoch, before_epoch, savedby, meta, minObjectID, and
*maxObjectID may not be provided. Only objects that are ordered
*after the reference, exclusive, will be included in the
*result, and the resulting list will be sorted by reference.
*obj_id minObjectID - only return objects with an object id greater or
*equal to this value.
*obj_id maxObjectID - only return objects with an object id less than or
*equal to this value.
*boolean showDeleted - show deleted objects in workspaces to which the
*user has write access.
*boolean showOnlyDeleted - only show deleted objects in workspaces to
*which the user has write access.
*boolean showHidden - show hidden objects.
*boolean showAllVersions - show all versions of each object that match
*the filters rather than only the most recent version.
*boolean includeMetadata - include the user provided metadata in the
*returned object_info. If false (0 or null), the default, the
*metadata will be null.
*boolean excludeGlobal - DEPRECATED, no longer useful. Filter on global workspaces by
*excluding them from the input workspace list(s).
*int limit - limit the output to X objects. Default and maximum value
*is 10000. Limit values < 1 are treated as 10000, the default.
*/
typedefstructure{
list<ws_name>workspaces;
list<ws_id>ids;
type_stringtype;
permissionperm;
list<username>savedby;
usermetameta;
timestampafter;
timestampbefore;
epochafter_epoch;
epochbefore_epoch;
stringstartafter;
obj_idminObjectID;
obj_idmaxObjectID;
booleanshowDeleted;
booleanshowOnlyDeleted;
booleanshowHidden;
booleanshowAllVersions;
booleanincludeMetadata;
booleanexcludeGlobal;
intlimit;
}
ListObjectsParams;

/*
*List objects in one or more workspaces.
*/
funcdeflist_objects(ListObjectsParamsparams)returns(list<object_info>objinfo)authenticationoptional;

/*
*Input parameters for the "get_objectmeta" function.
*
*Required arguments:
*ws_name workspace - name of the workspace containing the object for
*which metadata is to be retrieved
*obj_name id - name of the object for which metadata is to be retrieved
*
*Optional arguments:
*int instance - Version of the object for which metadata is to be
*retrieved, enabling retrieval of any previous version of an object
*string auth - the authentication token of the KBase account requesting
*access. Overrides the client provided authorization credentials if
*they exist.
*
*@deprecatedWorkspace.ObjectIdentity
*/
typedefstructure{
obj_nameid;
ws_nameworkspace;
intinstance;
stringauth;
}
get_objectmeta_params;

/*
*Retrieves the metadata for a specified object from the specified
*workspace. Provides access to metadata for all versions of the object
*via the instance parameter. Provided for backwards compatibility.
*
*@deprecatedWorkspace.get_object_info3
*/
funcdefget_objectmeta(get_objectmeta_paramsparams)returns(object_metadatametadata)authenticationoptional;

/*
*Get information about objects from the workspace.
*
*Set includeMetadata true to include the user specified metadata.
*Otherwise the metadata in the object_info will be null.
*
*This method will be replaced by the behavior of get_object_info_new
*in the future.
*
*@deprecatedWorkspace.get_object_info3
*/
funcdefget_object_info(list<ObjectIdentity>object_ids,booleanincludeMetadata)returns(list<object_info>info)authenticationoptional;

/*
*Input parameters for the "get_object_info_new" function.
*
*Required arguments:
*list<ObjectSpecification> objects - the objects for which the
*information should be fetched. Subsetting related parameters are
*ignored.
*
*Optional arguments:
*boolean includeMetadata - include the object metadata in the returned
*information. Default false.
*boolean ignoreErrors - Don't throw an exception if an object cannot
*be accessed; return null for that object's information instead.
*Default false.
*
*@deprecatedWorkspace.GetObjectInfo3Params
*/
typedefstructure{
list<ObjectSpecification>objects;
booleanincludeMetadata;
booleanignoreErrors;
}
GetObjectInfoNewParams;

/*
*Get information about objects from the workspace.
*
*@deprecatedWorkspace.get_object_info3
*/
funcdefget_object_info_new(GetObjectInfoNewParamsparams)returns(list<object_info>info)authenticationoptional;

/*
*Input parameters for the "get_object_info3" function.
*
*Required arguments:
*list<ObjectSpecification> objects - the objects for which the
*information should be fetched. Subsetting related parameters are
*ignored.
*
*Optional arguments:
*boolean infostruct - return information about the object as a structure rather than a tuple.
*Default false. If true, infos and paths will be null.
*boolean includeMetadata - include the user and admin metadata in the returned
*information. Default false.
*boolean ignoreErrors - Don't throw an exception if an object cannot
*be accessed; return null for that object's information and path instead.
*Default false.
*/
typedefstructure{
list<ObjectSpecification>objects;
booleaninfostruct;
booleanincludeMetadata;
booleanignoreErrors;
}
GetObjectInfo3Params;

/*
*Output from the get_object_info3 function.
*
*list<object_info> infos - the object_info data for each object.
*list<list<obj_ref> paths - the path to the object through the object reference graph for
*each object. All the references in the path are absolute.
*list<ObjectInfo> infostructs - the ObjectInfo data for each object.
*/
typedefstructure{
list<object_info>infos;
list<list<obj_ref>>paths;
list<ObjectInfo>infostructs;
}
GetObjectInfo3Results;

funcdefget_object_info3(GetObjectInfo3Paramsparams)returns(GetObjectInfo3Resultsresults)authenticationoptional;

/*
*Input parameters for the 'rename_workspace' function.
*
*Required arguments:
*WorkspaceIdentity wsi - the workspace to rename.
*ws_name new_name - the new name for the workspace.
*/
typedefstructure{
WorkspaceIdentitywsi;
ws_namenew_name;
}
RenameWorkspaceParams;

/*
*Rename a workspace.
*/
funcdefrename_workspace(RenameWorkspaceParamsparams)returns(workspace_inforenamed)authenticationrequired;

/*
*Input parameters for the 'rename_object' function.
*
*Required arguments:
*ObjectIdentity obj - the object to rename.
*obj_name new_name - the new name for the object.
*/
typedefstructure{
ObjectIdentityobj;
obj_namenew_name;
}
RenameObjectParams;

/*
*Rename an object. User meta data is always returned as null.
*/
funcdefrename_object(RenameObjectParamsparams)returns(object_inforenamed)authenticationrequired;

/*
*Input parameters for the 'copy_object' function.
*
*If the 'from' ObjectIdentity includes no version and the object is
*copied to a new name, the entire version history of the object is
*copied. In all other cases only the version specified, or the latest
*version if no version is specified, is copied.
*
*The version from the 'to' ObjectIdentity is always ignored.
*
*Required arguments:
*ObjectIdentity from - the object to copy.
*ObjectIdentity to - where to copy the object.
*/
typedefstructure{
ObjectIdentityfrom;
ObjectIdentityto;
}
CopyObjectParams;

/*
*Copy an object. Returns the object_info for the newest version.
*/
funcdefcopy_object(CopyObjectParamsparams)returns(object_infocopied)authenticationrequired;

/*
*Revert an object.
*
*The object specified in the ObjectIdentity is reverted to the version
*specified in the ObjectIdentity.
*/
funcdefrevert_object(ObjectIdentityobject)returns(object_inforeverted)authenticationrequired;

/*
*Input parameters for the get_names_by_prefix function.
*
*Required arguments:
*list<WorkspaceIdentity> workspaces - the workspaces to search.
*string prefix - the prefix of the object names to return.
*
*Optional arguments:
*boolean includeHidden - include names of hidden objects in the results.
*Default false.
*/
typedefstructure{
list<WorkspaceIdentity>workspaces;
stringprefix;
booleanincludeHidden;
}
GetNamesByPrefixParams;

/*
*Results object for the get_names_by_prefix function.
*
*list<list<obj_name>> names - the names matching the provided prefix,
*listed in order of the input workspaces.
*/
typedefstructure{
list<list<obj_name>>names;
}
GetNamesByPrefixResults;

/*
*Get object names matching a prefix. At most 1000 names are returned.
*No particular ordering is guaranteed, nor is which names will be
*returned if more than 1000 are found.
*
*This function is intended for use as an autocomplete helper function.
*/
funcdefget_names_by_prefix(GetNamesByPrefixParamsparams)returns(GetNamesByPrefixResultsres)authenticationoptional;

/*
*Hide objects. All versions of an object are hidden, regardless of
*the version specified in the ObjectIdentity. Hidden objects do not
*appear in the list_objects method.
*/
funcdefhide_objects(list<ObjectIdentity>object_ids)returns()authenticationrequired;

/*
*Unhide objects. All versions of an object are unhidden, regardless
*of the version specified in the ObjectIdentity.
*/
funcdefunhide_objects(list<ObjectIdentity>object_ids)returns()authenticationrequired;

/*
*Delete objects. All versions of an object are deleted, regardless of
*the version specified in the ObjectIdentity.
*/
funcdefdelete_objects(list<ObjectIdentity>object_ids)returns()authenticationrequired;

/*
*Undelete objects. All versions of an object are undeleted, regardless
*of the version specified in the ObjectIdentity. If an object is not
*deleted, no error is thrown.
*/
funcdefundelete_objects(list<ObjectIdentity>object_ids)returns()authenticationrequired;

/*
*Delete a workspace. All objects contained in the workspace are deleted.
*/
funcdefdelete_workspace(WorkspaceIdentitywsi)returns()authenticationrequired;

/*
*A type specification (typespec) file in the KBase Interface Description
*Language (KIDL).
*/
typedefstringtypespec;

/*
*A module name defined in a KIDL typespec.
*/
typedefstringmodulename;

/*
*A type definition name in a KIDL typespec.
*/
typedefstringtypename;

/*
*A version of a type.
*Specifies the version of the type in a single string in the format
*[major].[minor]:
*
*major - an integer. The major version of the type. A change in the
*major version implies the type has changed in a non-backwards
*compatible way.
*minor - an integer. The minor version of the type. A change in the
*minor version implies that the type has changed in a way that is
*backwards compatible with previous type definitions.
*/
typedefstringtypever;

/*
*A function string for referencing a funcdef.
*Specifies the function and its version in a single string in the format
*[modulename].[funcname]-[major].[minor]:
*
*modulename - a string. The name of the module containing the function.
*funcname - a string. The name of the function as assigned by the funcdef
*statement.
*major - an integer. The major version of the function. A change in the
*major version implies the function has changed in a non-backwards
*compatible way.
*minor - an integer. The minor version of the function. A change in the
*minor version implies that the function has changed in a way that is
*backwards compatible with previous function definitions.
*
*In many cases, the major and minor versions are optional, and if not
*provided the most recent version will be used.
*
*Example: MyModule.MyFunc-3.1
*/
typedefstringfunc_string;

/*
*The version of a typespec file.
*/
typedefintspec_version;

/*
*The JSON Schema (v4) representation of a type definition.
*/
typedefstringjsonschema;

/*
*Request ownership of a module name. A Workspace administrator
*must approve the request.
*/
funcdefrequest_module_ownership(modulenamemod)returns()authenticationrequired;

/*
*Parameters for the register_typespec function.
*
*Required arguments:
*One of:
*typespec spec - the new typespec to register.
*modulename mod - the module to recompile with updated options (see below).
*
*Optional arguments:
*boolean dryrun - Return, but do not save, the results of compiling the
*spec. Default true. Set to false for making permanent changes.
*list<typename> new_types - types in the spec to make available in the
*workspace service. When compiling a spec for the first time, if
*this argument is empty no types will be made available. Previously
*available types remain so upon recompilation of a spec or
*compilation of a new spec.
*list<typename> remove_types - no longer make these types available in
*the workspace service for the new version of the spec. This does
*not remove versions of types previously compiled.
*mapping<modulename, spec_version> dependencies - By default, the
*latest released versions of spec dependencies will be included when
*compiling a spec. Specific versions can be specified here.
*spec_version prev_ver - the id of the previous version of the typespec.
*An error will be thrown if this is set and prev_ver is not the
*most recent version of the typespec. This prevents overwriting of
*changes made since retrieving a spec and compiling an edited spec.
*This argument is ignored if a modulename is passed.
*/
typedefstructure{
typespecspec;
modulenamemod;
list<typename>new_types;
list<typename>remove_types;
mapping<modulename,spec_version>dependencies;
booleandryrun;
spec_versionprev_ver;
}
RegisterTypespecParams;

/*
*Register a new typespec or recompile a previously registered typespec
*with new options.
*See the documentation of RegisterTypespecParams for more details.
*Also see the release_types function.
*/
funcdefregister_typespec(RegisterTypespecParamsparams)returns(mapping<type_string,jsonschema>)authenticationrequired;

/*
*Parameters for the register_typespec_copy function.
*
*Required arguments:
*string external_workspace_url - the URL of the workspace server from
*which to copy a typespec.
*modulename mod - the name of the module in the workspace server
*
*Optional arguments:
*spec_version version - the version of the module in the workspace
*server
*/
typedefstructure{
stringexternal_workspace_url;
modulenamemod;
spec_versionversion;
}
RegisterTypespecCopyParams;

/*
*Register a copy of new typespec or refresh an existing typespec which is
*loaded from another workspace for synchronization. Method returns new
*version of module in current workspace.
*
*Also see the release_types function.
*/
funcdefregister_typespec_copy(RegisterTypespecCopyParamsparams)returns(spec_versionnew_local_version)authenticationrequired;

/*
*Release a module for general use of its types.
*
*Releases the most recent version of a module. Releasing a module does
*two things to the module's types:
*1) If a type's major version is 0, it is changed to 1. A major
*version of 0 implies that the type is in development and may have
*backwards incompatible changes from minor version to minor version.
*Once a type is released, backwards incompatible changes always
*cause a major version increment.
*2) This version of the type becomes the default version, and if a
*specific version is not supplied in a function call, this version
*will be used. This means that newer, unreleased versions of the
*type may be skipped.
*/
funcdefrelease_module(modulenamemod)returns(list<type_string>types)authenticationrequired;

/*
*Parameters for the list_modules() function.
*
*Optional arguments:
*username owner - only list modules owned by this user.
*/
typedefstructure{
usernameowner;
}
ListModulesParams;

/*
*List typespec modules.
*/
funcdeflist_modules(ListModulesParamsparams)returns(list<modulename>modules)authenticationnone;

/*
*Parameters for the list_module_versions function.
*
*Required arguments:
*One of:
*modulename mod - returns all versions of the module.
*type_string type - returns all versions of the module associated with
*the type.
*/
typedefstructure{
modulenamemod;
type_stringtype;
}
ListModuleVersionsParams;

/*
*A set of versions from a module.
*
*modulename mod - the name of the module.
*list<spec_version> - a set or subset of versions associated with the
*module.
*list<spec_version> - a set or subset of released versions associated
*with the module.
*/
typedefstructure{
modulenamemod;
list<spec_version>vers;
list<spec_version>released_vers;
}
ModuleVersions;

/*
*List typespec module versions.
*/
funcdeflist_module_versions(ListModuleVersionsParamsparams)returns(ModuleVersionsvers)authenticationoptional;

/*
*Parameters for the get_module_info function.
*
*Required arguments:
*modulename mod - the name of the module to retrieve.
*
*Optional arguments:
*spec_version ver - the version of the module to retrieve. Defaults to
*the latest version.
*/
typedefstructure{
modulenamemod;
spec_versionver;
}
GetModuleInfoParams;

/*
*Information about a module.
*
*list<username> owners - the owners of the module.
*spec_version ver - the version of the module.
*typespec spec - the typespec.
*string description - the description of the module from the typespec.
*mapping<type_string, jsonschema> types - the types associated with this
*module and their JSON schema.
*mapping<modulename, spec_version> included_spec_version - names of
*included modules associated with their versions.
*string chsum - the md5 checksum of the object.
*list<func_string> functions - list of names of functions registered in spec.
*boolean is_released - shows if this version of module was released (and
*hence can be seen by others).
*/
typedefstructure{
list<username>owners;
spec_versionver;
typespecspec;
stringdescription;
mapping<type_string,jsonschema>types;
mapping<modulename,spec_version>included_spec_version;
stringchsum;
list<func_string>functions;
booleanis_released;
}
ModuleInfo;

funcdefget_module_info(GetModuleInfoParamsparams)returns(ModuleInfoinfo)authenticationoptional;

/*
*Get JSON schema for a type.
*/
funcdefget_jsonschema(type_stringtype)returns(jsonschemaschema)authenticationoptional;

/*
*Translation from types qualified with MD5 to their semantic versions
*/
funcdeftranslate_from_MD5_types(list<type_string>md5_types)returns(mapping<type_string,list<type_string>>sem_types)authenticationnone;

/*
*Translation from types qualified with semantic versions to their MD5'ed versions
*/
funcdeftranslate_to_MD5_types(list<type_string>sem_types)returns(mapping<type_string,type_string>md5_types)authenticationoptional;

/*
*Information about a type
*
*type_string type_def - resolved type definition id.
*string description - the description of the type from spec file.
*string spec_def - reconstruction of type definition from spec file.
*jsonschema json_schema - JSON schema of this type.
*string parsing_structure - json document describing parsing structure of type
*in spec file including involved sub-types.
*list<spec_version> module_vers - versions of spec-files containing
*given type version.
*list<spec_version> released_module_vers - versions of released spec-files
*containing given type version.
*list<type_string> type_vers - all versions of type with given type name.
*list<type_string> released_type_vers - all released versions of type with
*given type name.
*list<func_string> using_func_defs - list of functions (with versions)
*referring to this type version.
*list<type_string> using_type_defs - list of types (with versions)
*referring to this type version.
*list<type_string> used_type_defs - list of types (with versions)
*referred from this type version.
*/
typedefstructure{
type_stringtype_def;
stringdescription;
stringspec_def;
jsonschemajson_schema;
stringparsing_structure;
list<spec_version>module_vers;
list<spec_version>released_module_vers;
list<type_string>type_vers;
list<type_string>released_type_vers;
list<func_string>using_func_defs;
list<type_string>using_type_defs;
list<type_string>used_type_defs;
}
TypeInfo;

funcdefget_type_info(type_stringtype)returns(TypeInfoinfo)authenticationoptional;

funcdefget_all_type_info(modulenamemod)returns(list<TypeInfo>)authenticationoptional;

/*
*DEPRECATED
*@deprecated
*/
typedefstructure{
func_stringfunc_def;
stringdescription;
stringspec_def;
stringparsing_structure;
list<spec_version>module_vers;
list<spec_version>released_module_vers;
list<func_string>func_vers;
list<func_string>released_func_vers;
list<type_string>used_type_defs;
}
FuncInfo;

/*
*@deprecated
*/
funcdefget_func_info(func_stringfunc)returns(FuncInfoinfo)authenticationoptional;

/*
*@deprecated
*/
funcdefget_all_func_info(modulenamemod)returns(list<FuncInfo>info)authenticationoptional;

/*
*Parameters for the grant_module_ownership function.
*
*Required arguments:
*modulename mod - the module to modify.
*username new_owner - the user to add to the module's list of
*owners.
*
*Optional arguments:
*boolean with_grant_option - true to allow the user to add owners
*to the module.
*/
typedefstructure{
modulenamemod;
usernamenew_owner;
booleanwith_grant_option;
}
GrantModuleOwnershipParams;

/*
*Grant ownership of a module. You must have grant ability on the
*module.
*/
funcdefgrant_module_ownership(GrantModuleOwnershipParamsparams)returns()authenticationrequired;

/*
*Parameters for the remove_module_ownership function.
*
*Required arguments:
*modulename mod - the module to modify.
*username old_owner - the user to remove from the module's list of
*owners.
*/
typedefstructure{
modulenamemod;
usernameold_owner;
}
RemoveModuleOwnershipParams;

/*
*Remove ownership from a current owner. You must have the grant ability
*on the module.
*/
funcdefremove_module_ownership(RemoveModuleOwnershipParamsparams)returns()authenticationrequired;

/*
*Parameters for list_all_types function.
*
*Optional arguments:
*boolean with_empty_modules - include empty module names, optional flag,
*default value is false.
*/
typedefstructure{
booleanwith_empty_modules;
}
ListAllTypesParams;

/*
*List all released types with released version from all modules. Return
*mapping from module name to mapping from type name to released type
*version.
*/
funcdeflist_all_types(ListAllTypesParamsparams)returns(mapping<modulename,mapping<typename,typever>>)authenticationoptional;

/*
*The results of the get_admin_role call.
*
*adminrole - the users's administration role, one of `none`, `read`, or `full`.
*/
typedefstructure{
stringadminrole;
}
GetAdminRoleResults;

/*
*Get the administrative role for the current user.
*/
funcdefget_admin_role()returns(GetAdminRoleResultsresults)authenticationrequired;

/*
*An object metadata update specification.
*
*Required arguments:
*ObjectIdentity oi - the object to be altered
*
*One or both of the following arguments are required:
*usermeta new - metadata to assign to the workspace. Duplicate keys will
*be overwritten.
*list<string> remove - these keys will be removed from the workspace
*metadata key/value pairs.
*/
typedefstructure{
ObjectIdentityoi;
usermetanew;
list<string>remove;
}
ObjectMetadataUpdate;

/*
*Input parameters for the alter_admin_object_metadata method.
*
*updates - the metadata updates to apply to the objects. If the same object is specified
*twice in the list, the update order is unspecified. At most 1000 updates are allowed
*in one call.
*/
typedefstructure{
list<ObjectMetadataUpdate>updates;
}
AlterAdminObjectMetadataParams;

/*
*Update admin metadata for an object. The user must have full workspace service
*administration privileges.
*/
funcdefalter_admin_object_metadata(AlterAdminObjectMetadataParamsparams)returns()authenticationrequired;

/*
*The administration interface.
*/
funcdefadminister(UnspecifiedObjectcommand)returns(UnspecifiedObjectresponse)authenticationrequired;
};

Function Index

administer
alter_admin_object_metadata
alter_workspace_metadata
clone_workspace
copy_object
create_workspace
delete_objects
delete_workspace
get_admin_role
get_all_func_info
get_all_type_info
get_func_info
get_jsonschema
get_module_info
get_names_by_prefix
get_object
get_object_history
get_object_info
get_object_info3
get_object_info_new
get_object_provenance
get_object_subset
get_objectmeta
get_objects
get_objects2
get_permissions
get_permissions_mass
get_referenced_objects
get_type_info
get_workspace_description
get_workspace_info
get_workspacemeta
grant_module_ownership
hide_objects
list_all_types
list_module_versions
list_modules
list_objects
list_referencing_object_counts
list_referencing_objects
list_workspace_ids
list_workspace_info
list_workspace_objects
list_workspaces
lock_workspace
register_typespec
register_typespec_copy
release_module
remove_module_ownership
rename_object
rename_workspace
request_module_ownership
revert_object
save_object
save_objects
set_global_permission
set_permissions
set_workspace_description
translate_from_MD5_types
translate_to_MD5_types
undelete_objects
unhide_objects
ver

Type Index

AlterAdminObjectMetadataParams
AlterWorkspaceMetadataParams
boolean
CloneWorkspaceParams
CopyObjectParams
CreateWorkspaceParams
epoch
ExternalDataUnit
extracted_id
func_string
FuncInfo
get_object_output
get_object_params
get_objectmeta_params
get_workspacemeta_params
GetAdminRoleResults
GetModuleInfoParams
GetNamesByPrefixParams
GetNamesByPrefixResults
GetObjectInfo3Params
GetObjectInfo3Results
GetObjectInfoNewParams
GetObjects2Params
GetObjects2Results
GetPermissionsMassParams
GrantModuleOwnershipParams
id_type
jsonschema
list_workspace_objects_params
list_workspaces_params
ListAllTypesParams
ListModulesParams
ListModuleVersionsParams
ListObjectsParams
ListWorkspaceIDsParams
ListWorkspaceIDsResults
ListWorkspaceInfoParams
lock_status
ModuleInfo
modulename
ModuleVersions
obj_id
obj_name
obj_ref
obj_ver
object_info
object_metadata
object_path
ObjectData
ObjectIdentity
ObjectInfo
ObjectMetadataUpdate
ObjectProvenanceInfo
ObjectSaveData
ObjectSpecification
permission
ProvenanceAction
ref_chain
ref_string
RegisterTypespecCopyParams
RegisterTypespecParams
RemoveModuleOwnershipParams
RenameObjectParams
RenameWorkspaceParams
save_object_params
SaveObjectsParams
SetGlobalPermissionsParams
SetPermissionsParams
SetWorkspaceDescriptionParams
spec_version
SubAction
SubObjectIdentity
timestamp
type_string
TypeInfo
typename
typespec
typever
usermeta
username
workspace_info
workspace_metadata
WorkspaceIdentity
WorkspacePermissions
ws_id
ws_name
\ No newline at end of file diff --git a/docsource/buildandconfigure.rst b/docsource/buildandconfigure.rst index 4001e515e..8233d16c5 100644 --- a/docsource/buildandconfigure.rst +++ b/docsource/buildandconfigure.rst @@ -3,79 +3,30 @@ Build, configure, and deploy ============================ -These instructions assume the reader is familiar with the process of deploying -a KBase module, including the `runtime `_ -and `dev_container `_, and has access to -a system with the KBase runtime installed. These instructions are based on the -``kbase-image-v26`` runtime image. - -Unlike many modules the WSS can be built and tested outside the -``dev_container``, but the ``dev_container`` is required to build and test the -scripts. These instructions are for deploying the server and so do not -address the scripts. Building outside the ``dev_container`` means the Makefile -uses several default values for deployment - if you wish to use other values -deploy from the ``dev_container`` as usual. - Build the workspace service --------------------------- -First checkout the ``dev_container``:: +Get the code:: - /kb$ sudo git clone https://github.com/kbase/dev_container - Cloning into 'dev_container'... - remote: Counting objects: 1097, done. - remote: Total 1097 (delta 0), reused 0 (delta 0), pack-reused 1097 - Receiving objects: 100% (1097/1097), 138.81 KiB, done. - Resolving deltas: 100% (661/661), done. -.. note:: - In the v26 image, ``/kb`` is owned by ``root``. As an alternative to - repetitive ``sudo`` s, ``chown`` ``/kb`` to the user. - -Bootstrap and source the user environment file, which sets up Java and Perl -paths which the WSS build needs:: - - /kb$ cd dev_container/ - /kb/dev_container$ sudo ./bootstrap /kb/runtime/ - /kb/dev_container$ source user-env.sh - -Now the WSS may be built. If building inside the ``dev_container`` all the -dependencies from the ``DEPENDENCIES`` file are required, but to build outside -the ``dev_container``, only the ``jars`` and ``workspace_deluxe`` repos are -necessary:: - - ~$ mkdir kb - ~$ cd kb - ~/kb$ git clone https://github.com/kbase/workspace_deluxe - Cloning into 'workspace_deluxe'... - remote: Counting objects: 21961, done. - remote: Compressing objects: 100% (40/40), done. - remote: Total 21961 (delta 20), reused 0 (delta 0), pack-reused 21921 - Receiving objects: 100% (21961/21961), 21.42 MiB | 16.27 MiB/s, done. - Resolving deltas: 100% (13979/13979), done. - - ~/kb$ git clone https://github.com/kbase/jars - Cloning into 'jars'... - remote: Counting objects: 1466, done. - remote: Total 1466 (delta 0), reused 0 (delta 0), pack-reused 1466 - Receiving objects: 100% (1466/1466), 59.43 MiB | 21.49 MiB/s, done. - Resolving deltas: 100% (626/626), done. - - ~/kb$ cd workspace_deluxe/ - ~/kb/workspace_deluxe$ make - *snip* + ~$ git clone https://github.com/kbase/workspace_deluxe -``make`` will build: +Build:: -* A workspace client jar in ``/dist/client`` -* A workspace server jar in ``/dist`` -* This documentation in ``/docs`` + ~$ cd workspace_deluxe/ + ~/workspace_deluxe$ ./gradlew buildAll + *snip* -.. note:: - If the build fails due to a sphinx error, sphinx may require an upgrade to - >= 1.3:: +``buildAll`` will build several artifacts: - $ sudo pip install sphinx --upgrade +* A workspace client jar at ``client/build/libs/client.jar`` +* A workspace server WAR file at ``service/build/libs/service.war`` +* A workspace shadow jar containing all test code at + ``service/build/libs/service-test-shadow-all.jar``. This is useful for starting a workpace server + from other processes without needing a docker container, but should **only** be used for testing. + +It will also build the ``service/build/update_workspace_database_schema`` script which is used to +update the workspace schema if it changes from one version to another. .. _servicedeps: @@ -133,10 +84,7 @@ to create the file. It is especially important to protect the credentials that the WSS uses to talk to S3 (``backend-token``) as they can be used to delete or corrupt the workspace data. At minimum, only the user that runs the WSS (which - should **not** be ``root``) should have read access to ``deploy.cfg``. Also be - aware that the ``deploy.cfg`` contents are copied to, by default, - ``/kb/deployment/deployment.cfg`` when the workspace is deployed from the - ``dev_container``. + should **not** be ``root``) should have read access to ``deploy.cfg``. .. _configurationparameters: @@ -338,9 +286,6 @@ is checked against ``bytestream-user``, and if the names differ, the server will .. warning:: Once any data containing Shock node IDs has been saved by the workspace, changing the shock user will result in unspecified behavior, including data corruption. -.. note:: It is strongly encouraged to use different accounts for the backend shock user and - the linking shock user so that core workspace data can be distinguished from linked data. - bytestream-token """""""""""""""" **Required**: If linking WSS objects to Shock nodes is desired. @@ -408,6 +353,17 @@ for a request, in order of precedence, is 1) the first address in Deploy and start the server --------------------------- +.. todo:: + This section needs an entire rewrite from scratch with Tomcat as the application server and + a clean, easy install instruction set or a script to set things up correctly (e.g. + the port and memory settings in the ``deploy.cfg`` file are currently ignored). + Currently, the easiest way to run the service locally is via ``docker compose up -d --build`` + which will start a KBase auth server in testmode and the workspace. If deploying outside + a docker container is required, the best option for now is to inspect the Dockerfile and + attempt to follow the steps there. + + Also, the developer and administrator server startup documentation should be unified. + To avoid various issues when deploying, ``chown`` the deployment directory to the user. Alternatively, chown ``/kb/`` to the user, or deploy as root. :: diff --git a/docsource/builddocs.rst b/docsource/builddocs.rst index 3bb3c2cdf..ea4e37bc7 100644 --- a/docsource/builddocs.rst +++ b/docsource/builddocs.rst @@ -1,9 +1,8 @@ Build documentation =================== -This documentation assumes the documentation build occurs on Ubuntu 12.04LTS, -but things should work similarly on other distributions. It does **not** -assume that the KBase runtime or ``dev_container`` are installed. +This documentation assumes the documentation build occurs on Ubuntu 18.04LTS, +but things should work similarly on other distributions. Requirements ------------ @@ -12,43 +11,17 @@ The build requires: Java JDK 11 -`Java ant `_:: +`Python `_ `Sphinx `_ 1.3+ - sudo apt-get install ant - -`Python `_ `Sphinx `_ 1.3+:: - -Either - - sudo apt-get install python3-sphinx - -or, if the `python3-sphinx` package is not available for your distribution - - curl https://bootstrap.pypa.io/get-pip.py > get-pip.py - sudo python get-pip.py - sudo pip install sphinx --upgrade .. _getcode: Getting the code ---------------- -Clone the jars and workspace_deluxe repos:: - - bareubuntu@bu:~/ws$ git clone https://github.com/kbase/jars - Cloning into 'jars'... - remote: Counting objects: 1466, done. - remote: Total 1466 (delta 0), reused 0 (delta 0), pack-reused 1466 - Receiving objects: 100% (1466/1466), 59.43 MiB | 2.43 MiB/s, done. - Resolving deltas: 100% (626/626), done. +Clone the workspace_deluxe repo:: bareubuntu@bu:~/ws$ git clone https://github.com/kbase/workspace_deluxe - Cloning into 'workspace_deluxe'... - remote: Counting objects: 22004, done. - remote: Compressing objects: 100% (82/82), done. - remote: Total 22004 (delta 41), reused 0 (delta 0), pack-reused 21921 - Receiving objects: 100% (22004/22004), 21.44 MiB | 2.44 MiB/s, done. - Resolving deltas: 100% (14000/14000), done. Build ----- @@ -56,6 +29,6 @@ Build Build the documentation:: bareubuntu@bu:~/ws$ cd workspace_deluxe/ - bareubuntu@bu:~/ws/workspace_deluxe$ make build-docs + bareubuntu@bu:~/ws/workspace_deluxe$ ./gradlew buildDocs -The build directory is ``docs``. +The build directory is ``service/build/docs``. diff --git a/docsource/buildinitclient.rst b/docsource/buildinitclient.rst index 9921255e9..25456555e 100644 --- a/docsource/buildinitclient.rst +++ b/docsource/buildinitclient.rst @@ -4,40 +4,21 @@ Build and initialize the workspace client ========================================= This documentation describes how to build and initialize the workspace clients. -It assumes the documentation build occurs on Ubuntu 12.04LTS, -but things should work similarly on other distributions. It assumes that the -``workspace_deluxe`` and ``jars`` repos have been cloned (see :ref:`getcode`) -but does **not** assume that the KBase runtime or ``dev_container`` are -installed. +It assumes the build occurs on Ubuntu 18.04LTS. It assumes that the +``workspace_deluxe`` repo has been cloned (see :ref:`getcode`). Python client ------------- -Currently the Python client only supports Python 2.7. The Python client checked -into ``libs/biokbase/workspace/client.py`` does not -require a build, but does require the ``requests`` (v 2+) 3rd party library, which, -depending on the Python version, can be -`tricky to install securely `_. -The following incantation worked for the author:: - - sudo apt-get install python-dev libffi-dev libssl-dev - curl https://bootstrap.pypa.io/get-pip.py > get-pip.py - sudo python get-pip.py - sudo pip install --upgrade requests - sudo pip install --upgrade requests[security] - -For python 2.7.9+ ``sudo pip install --upgrade requests`` should -work. +The Python client checked into ``libs/biokbase/workspace/client.py`` does not +require a build, but does require the `requests `_ library. Change the working directory to the lib directory:: bareubuntu@bu:~/ws$ cd workspace_deluxe/lib/ bareubuntu@bu:~/ws/workspace_deluxe/lib$ -Alternatively, add this directory to the ``PYTHONPATH``. If deploying with -the ``dev_container``, the client will be copied to -``/kb/deployment/lib/biokbase/workspace/client.py`` and the ``user-env`` script -will set up the ``PYTHONPATH``. +Alternatively, add this directory to the ``PYTHONPATH``. Here we use the iPython interpreter to demonstrate initializing the client, but the standard python interpreter will also work:: @@ -47,57 +28,50 @@ but the standard python interpreter will also work:: .. code-block:: python In [1]: from biokbase.workspace.client import Workspace - In [2]: ws = Workspace('https://kbase.us/services/ws', user_id='kbasetest', password=[redacted]) + In [2]: ws = Workspace('https://kbase.us/services/ws', token=[redacted]) In [3]: ws.ver() - Out[3]: u'0.3.5' + Out[3]: u'0.14.2' + +Developer tokens are available from the Account page of the KBase Narrative for approved developers +or can be created in the testmode API of the +`KBase authentication server `_ if running a local workspace and +auth server. Java client ----------- -The Java client build requires: - -Java JDK 6+ (`install instructions `_) +The easiest way to use the client is with a build tool like Gradle or Maven, fetching the client +via https://jitpack.io/#kbase/workspace_deluxe. -`Java ant `_:: +If you want to build the client manually read on. - sudo apt-get install ant +The Java client build requires Java JDK 11+. Build the client:: - bareubuntu@bu:~/ws/workspace_deluxe$ make compile-java-client - ant compile_client - Buildfile: /home/bareubuntu/ws/workspace_deluxe/build.xml + bareubuntu@bu:~/ws/workspace_deluxe$ ./gradlew jar - compile_client: - [mkdir] Created dir: /home/bareubuntu/ws/workspace_deluxe/client_classes - [javac] Compiling 48 source files to /home/bareubuntu/ws/workspace_deluxe/client_classes - [jar] Building jar: /home/bareubuntu/ws/workspace_deluxe/dist/client/WorkspaceClient.jar - [delete] Deleting directory /home/bareubuntu/ws/workspace_deluxe/client_classes +The client jar is created in ``client/build/libs/client.jar``. - BUILD SUCCESSFUL - Total time: 3 seconds +For simplicity, copy the required jars into a single directory. You will also need the following +jars, which can be downloaded from a maven repository or https://jitpack.io: -The client jar is created in ``dist/client/WorkspaceClient.jar``. +* The `Jackson `_ annotations, core, and databind jars + (maven) +* The javax annotation api jar (maven) +* The `KBase auth client jar `_ +* The `KBase java_common jar `_ -For simplicity, copy the required jars into a single directory:: +:: bareubuntu@bu:~/ws$ mkdir tryjavaclient bareubuntu@bu:~/ws$ cd tryjavaclient/ - bareubuntu@bu:~/ws/tryjavaclient$ cp ../workspace_deluxe/dist/client/WorkspaceClient.jar . - bareubuntu@bu:~/ws/tryjavaclient$ cp ../jars/lib/jars/jackson/jackson-annotations-2.5.4.jar . - bareubuntu@bu:~/ws/tryjavaclient$ cp ../jars/lib/jars/jackson/jackson-core-2.5.4.jar . - bareubuntu@bu:~/ws/tryjavaclient$ cp ../jars/lib/jars/jackson/jackson-databind-2.5.4.jar . - bareubuntu@bu:~/ws/tryjavaclient$ cp ../jars/lib/jars/kbase/auth/kbase-auth-0.4.4.jar . - bareubuntu@bu:~/ws/tryjavaclient$ cp ../jars/lib/jars/kbase/common/kbase-common-0.0.24.jar . bareubuntu@bu:~/ws/tryjavaclient$ ls - jackson-annotations-2.5.4.jar kbase-auth-0.4.4.jar - jackson-core-2.5.4.jar kbase-common-0.0.24.jar - jackson-databind-2.5.4.jar WorkspaceClient.jar - - -When creating an application using the WSS it's advisable to use a build tool -like ``ant``, ``maven``, or ``gradle`` to organize the required jars. + auth2_client_java-0.5.0.jar java_common-0.3.0.jar + jackson-annotations-2.9.9.jar javax.annotation-api-1.3.2.jar + jackson-core-2.9.9.jar client.jar + jackson-databind-2.9.9.jar This simple program initializes and calls a method on the WSS client:: @@ -105,26 +79,23 @@ This simple program initializes and calls a method on the WSS client:: .. code-block:: java + import java.net.URI; import java.net.URL; - import us.kbase.auth.AuthConfig; - import us.kbase.workspace.WorkspaceClient; - import us.kbase.auth.ConfigurableAuthService; import us.kbase.auth.AuthToken; + import us.kbase.auth.client.AuthClient; + import us.kbase.workspace.WorkspaceClient; public class TryWorkspaceClient { public static void main(String[] args) throws Exception { - String authUrl = - "https://ci.kbase.us/services/auth/api/legacy/KBase/Sessions/Login/"; - - ConfigurableAuthService authService = new ConfigurableAuthService( - new AuthConfig().withKBaseAuthServerURL(new URL(authUrl)); + final String authUrl = "https://appdev.kbase.us/services/auth/"; + final AuthClient authcli = AuthClient.from(new URI(authUrl)); - String tokenString = YOUR_AUTH_TOKEN_HERE; - AuthToken token = authService.validateToken(tokenString); + final String tokenString = args[0]; + final AuthToken token = authcli.validateToken(tokenString); - WorkspaceClient client = new WorkspaceClient( - new URL("https://ci.kbase.us/services/ws/"), + final WorkspaceClient client = new WorkspaceClient( + new URL("https://appdev.kbase.us/services/ws/"), token); System.out.println(client.ver()); } @@ -133,18 +104,11 @@ This simple program initializes and calls a method on the WSS client:: Compile and run:: bareubuntu@bu:~/ws/tryjavaclient$ javac -cp "./*" TryWorkspaceClient.java - bareubuntu@bu:~/ws/tryjavaclient$ java -cp "./:./*" TryWorkspaceClient - 0.8.0 + bareubuntu@bu:~/ws/tryjavaclient$ java -cp "./:./*" TryWorkspaceClient $KBASE_TOKEN + 0.14.2 For more client initialization and configuration options, see :ref:`apidocs`. -Perl client ------------ - -.. todo:: - Build and initialization instructions for the Perl client. If this can - be done without the KBase runtime & dev_container that'd be ideal. - Javascript client ----------------- diff --git a/docsource/conf.py b/docsource/conf.py index 62b8d1086..d7f6497c9 100644 --- a/docsource/conf.py +++ b/docsource/conf.py @@ -50,9 +50,9 @@ # built documents. # # The short X.Y version. -version = '0.14' +version = '0.15' # The full version, including alpha/beta/rc tags. -release = '0.14.3' +release = '0.15.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docsource/developers.rst b/docsource/developers.rst index 2e027c5fa..cff1baa31 100644 --- a/docsource/developers.rst +++ b/docsource/developers.rst @@ -22,9 +22,15 @@ Branches: Recompiling the generated code ------------------------------ -To compile, simply run ``make compile``. The -`kb-sdk `_ executable must be in the system -path. +To compile the Workspace generated code from ``workspace.spec``, run ``./gradlew sdkCompile``. + +Note that: + +* The `kb-sdk `_ executable must be in the system path. +* The WorkspaceServer class compiled in constructor has been commented out in order to use + a custom constructor. In order for the compile to succeed, the custom constructor must be + commented out and the compiled in constructor uncommented. When the compile is complete the + constructors must be switched back. Release checklist ----------------- @@ -52,6 +58,16 @@ Release checklist Deploying the Workspace Service locally ---------------------------------------- + +.. todo:: + This section needs an entire rewrite from scratch with Tomcat as the application server. + Currently, the easiest way to run the service locally is via ``docker compose up -d --build`` + which will start a KBase auth server in testmode and the workspace. If deploying outside + a docker container is required, the best option for now is to inspect the Dockerfile and + attempt to follow the steps there. + + Also, the developer and administrator server startup documentation should be unified. + These instructions are known to work on Ubuntu 16.04 LTS. 1. Install the dependencies `Java8 `_, `Apache Ant `_, pymongo v2.8, `GlassFish v3.1.2.2 `_ , `mongodb >=v2.6.* `_, `kb-sdk `_ and the `KBase Jars `_ directory. diff --git a/docsource/releasenotes.rst b/docsource/releasenotes.rst index 6d67c630c..728cfbd9a 100644 --- a/docsource/releasenotes.rst +++ b/docsource/releasenotes.rst @@ -3,13 +3,24 @@ Workspace service release notes =============================== -VERSION: 0.14.3 (Released 2/22/2024) +VERSION: 0.15.0 (Released TBD) ------------------------------------ -UPDATES: +BACKWARDS INCOMPATIBILIES: -* The MongoDB clients have been updated to the most recent version and the service tested against Mongo 7. +* The Docserver now logs to standard out in the same way as the workspace server. + +UPDATES: +* The MongoDB clients have been updated to the most recent version and the service tested + against Mongo 7. +* Gradle has replaced Ant as the build tool. As a consequence, all the built artifacts are now + located in Gradle build directories, including the ``update_workspace_database_schema`` script. +* Client and test shadow jars have been published on jitpack.io. + * The shadow jar is intended for supporting tests in other repos. + This allows for starting the workspace service from a single jar in other applications. + All dependencies are included in the jar in shadow namespaces so they don't conflict with + different versions of the dependencies in the application under test. VERSION: 0.14.2 (Released 11/9/2023) ------------------------------------ diff --git a/docsource/test.rst b/docsource/test.rst index 68ca62ce1..9992a62bc 100644 --- a/docsource/test.rst +++ b/docsource/test.rst @@ -8,6 +8,10 @@ In order to run tests: * A Linux Shock binary is provided in ``shock_builds``. +.. todo:: + Update these instructions for the `Blobstore `_, + which has replaced Shock. + * Minio must be installed, but not necessarily running. * Minio version must be greater than 2019-05-23T00-29-34Z. @@ -15,11 +19,12 @@ In order to run tests: * The Handle Service must be installed, but not necessarily running. See ``test.cfg.example`` for setup instructions. -* The KBase Jars repo must be cloned into the parent directory of the workspace repo directory, - e.g:: +* The Sample Service must be installed, but not necessarily running. See ``test.cfg.example`` + for setup instructions. + +* `ArangoDB `_ must be installed but not necessarily running as it is a + requirement of the Sample Service. - ls - jars workspace_deluxe See :ref:`servicedeps` for more information about these test dependencies. @@ -30,7 +35,9 @@ Then:: cd python_dependencies/ pipenv shell cd .. - make test + ./gradlew test -The tests currently take 20-30 minutes to run on spinning disks, or 8-10 minutes on SSDs. +The ``testQuick`` target is substantially faster but does not run all tests. +.. todo:: + Move to developer documentation vs. server administrator documenation. diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 000000000..41d9927a4 Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000..17655d0ef --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100755 index 000000000..1b6c78733 --- /dev/null +++ b/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed 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 +# +# https://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. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/lib/Bio/KBase/workspace/Client.pm b/lib/Bio/KBase/workspace/Client.pm index 133e004a7..9e57b24c6 100644 --- a/lib/Bio/KBase/workspace/Client.pm +++ b/lib/Bio/KBase/workspace/Client.pm @@ -48,7 +48,7 @@ sub new if (!defined($url)) { - $url = 'https://kbase.us/services/ws/'; + $url = 'https://ci.kbase.us/services/ws'; } my $self = { @@ -10783,7 +10783,7 @@ compatibility. UnspecifiedObject data - The object's data. object_metadata metadata - Metadata for object retrieved/ -@deprecated Workspaces.ObjectData +@deprecated Workspace.ObjectData =item Definition diff --git a/lib/biokbase/workspace/client.py b/lib/biokbase/workspace/client.py index c5be1a5f2..d15ad017a 100644 --- a/lib/biokbase/workspace/client.py +++ b/lib/biokbase/workspace/client.py @@ -25,7 +25,7 @@ def __init__( trust_all_ssl_certificates=False, auth_svc='https://ci.kbase.us/services/auth/api/legacy/KBase/Sessions/Login'): if url is None: - url = 'https://kbase.us/services/ws/' + url = 'https://ci.kbase.us/services/ws' self._service_ver = None self._client = _BaseClient( url, timeout=timeout, user_id=user_id, password=password, @@ -914,7 +914,7 @@ def get_object(self, params, context=None): the "get_object" function. Provided for backwards compatibility. UnspecifiedObject data - The object's data. object_metadata metadata - Metadata for object retrieved/ @deprecated - Workspaces.ObjectData) -> structure: parameter "data" of + Workspace.ObjectData) -> structure: parameter "data" of unspecified object, parameter "metadata" of type "object_metadata" (Meta data associated with an object stored in a workspace. Provided for backwards compatibility. obj_name id - name of the diff --git a/lib/javascript/workspace/Client.js b/lib/javascript/workspace/Client.js index aab26a3a1..db77dfadd 100644 --- a/lib/javascript/workspace/Client.js +++ b/lib/javascript/workspace/Client.js @@ -17,7 +17,7 @@ function Workspace(url, auth, auth_cb, timeout, async_job_check_time_ms, service this.service_version = service_version; if (typeof(_url) != "string" || _url.length == 0) { - _url = "https://kbase.us/services/ws/"; + _url = "https://ci.kbase.us/services/ws"; } var _auth = auth ? auth : { 'token' : '', 'user_id' : ''}; var _auth_cb = auth_cb; diff --git a/readme.md b/readme.md index 6f084a149..7be8a53aa 100644 --- a/readme.md +++ b/readme.md @@ -22,7 +22,7 @@ use the WSS. The easiest way to read the documentation is to find an already built instance online: * [KBase Continuous Integration](https://ci.kbase.us/services/ws/docs/) -* [KBase Next](https://next.kbase.us/services/ws/docs/) +* [KBase Appdev](https://appdev.kbase.us/services/ws/docs/) * [KBase Production](https://kbase.us/services/ws/docs/) The documentation can also be read on Github as @@ -37,53 +37,25 @@ yourself. ### Building documentation -This documentation assumes the documentation build occurs on Ubuntu 12.04LTS, -but things should work similarly on other distributions. It does **not** -assume that the KBase runtime or `dev_container` are installed. +This documentation assumes the documentation build occurs on Ubuntu 18.04LTS, +but things should work similarly on other distributions. The build requires: Java JDK 11 -[Java ant](http://ant.apache.org): +[Python](https://www.python.org) [Sphinx](http://sphinx-doc.org/) 1.3+ - sudo apt-get install ant - -[Python](https://www.python.org) [Sphinx](http://sphinx-doc.org/) 1.3+: - -Either - - sudo apt-get install python3-sphinx - -or - - curl https://bootstrap.pypa.io/get-pip.py > get-pip.py - sudo python get-pip.py - sudo pip install sphinx --upgrade - -Clone the jars and workspace_deluxe repos: - - bareubuntu@bu:~/ws$ git clone https://github.com/kbase/jars - Cloning into 'jars'... - remote: Counting objects: 1466, done. - remote: Total 1466 (delta 0), reused 0 (delta 0), pack-reused 1466 - Receiving objects: 100% (1466/1466), 59.43 MiB | 2.43 MiB/s, done. - Resolving deltas: 100% (626/626), done. +Clone the workspace_deluxe repos: bareubuntu@bu:~/ws$ git clone https://github.com/kbase/workspace_deluxe - Cloning into 'workspace_deluxe'... - remote: Counting objects: 22004, done. - remote: Compressing objects: 100% (82/82), done. - remote: Total 22004 (delta 41), reused 0 (delta 0), pack-reused 21921 - Receiving objects: 100% (22004/22004), 21.44 MiB | 2.44 MiB/s, done. - Resolving deltas: 100% (14000/14000), done. Build the documentation: bareubuntu@bu:~/ws$ cd workspace_deluxe/ - bareubuntu@bu:~/ws/workspace_deluxe$ make build-docs + bareubuntu@bu:~/ws/workspace_deluxe$ ./gradlew buildDocs -The build directory is `docs`. +The build directory is `service/build/docs`. ### Notes on GitHub Actions automated tests @@ -94,24 +66,25 @@ Therefore, run the full test suite locally at least prior to every release. ### Downloading the Docker image -The latest `workspace_deluxe` image is available from the GitHub Container Repository; it can be downloaded [from the repository releases page](https://github.com/kbase/workspace_deluxe/releases/latest) or on the command line: +The latest `workspace_deluxe` image is available from the GitHub Container Repository: docker login ghcr.io docker pull ghcr.io/kbase/workspace_deluxe:latest ### Setting up a local instance -The included [docker-compose file](docker-compose.yml) allows developers to stand up a local workspace instance with an [auth2](http://github.com/kbase/auth2) instance in test mode. To mount the images: +The included [docker-compose file](docker-compose.yml) allows developers to stand up a local +workspace instance with an [auth2](http://github.com/kbase/auth2) instance in test mode: - # build the workspace docker image - docker compose build - # mount the images - docker compose up + docker compose up --build -d -The workspace has started up when the logs show a line that looks like +The workspace has started when the logs show a line that looks like INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 3198ms -Developers can then create a user and token using the auth2 service and use one of the clients in the [`lib/`](lib/) directory to interact with the workspace. See [workspace_container_test.py](scripts/workspace_container_test.py) as an example of this process. +Developers can then create a user and token using the auth2 service and use one of the clients +in the [`lib/`](lib/) directory to interact with the workspace. See +[workspace_container_test.py](scripts/workspace_container_test.py) as an example of this process. -See the [auth2 documentation](http://github.com/kbase/auth2) for details of the test mode interface. +See the [auth2 documentation](http://github.com/kbase/auth2) for details of the test mode +interface. diff --git a/server_scripts/README.md b/server_scripts/README.md new file mode 100644 index 000000000..6c7181b3b --- /dev/null +++ b/server_scripts/README.md @@ -0,0 +1,4 @@ +These scripts are deprecated in favor of a tomcat based deployment via Dockerfile. + +TODO: Redo the dockerfile with a clean install of an updated Tomcat installation +TODO: Redo server startup instructions in the docs cleanly, step by step \ No newline at end of file diff --git a/service/build.gradle b/service/build.gradle new file mode 100644 index 000000000..e10182650 --- /dev/null +++ b/service/build.gradle @@ -0,0 +1,391 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +// TODO TEST switch to Kotlin DSL which is now the default and apparently better +// TODO TEST avoid early configuration, see +// https://docs.gradle.org/current/userguide/task_configuration_avoidance.html +// need to avoid withType as well apparently? + +plugins { + id 'java' + id 'war' + id 'jacoco' + id 'maven-publish' + id 'org.ajoberstar.grgit' version '4.1.1' + id 'com.github.johnrengelman.shadow' version '8.1.1' +} + +group = 'com.github.kbase' + +var VER_JAVA_COMMON = "0.3.0" +var VER_AUTH2_CLIENT = "0.5.0" +var VER_AUTH2_SHADOW = "0.7.1" +var VER_JACKSON = "2.9.9" + + +var DEFAULT_URL = "https://ci.kbase.us/services/ws" + +var BUILD_DOC_ROOT = "$buildDir/docs/" +var BUILD_JAVA_DOC_DIR = "$BUILD_DOC_ROOT/javadoc" +var BUILD_OTHER_DOC_DIR = "$BUILD_DOC_ROOT/otherdoc/" +// This is where the DocServer will look for docs, if it changes it needs to change +// in deploy.cfg as well +// TODO DOCS just get rid of configuring this in the DocServer, make things hardcoded +// or pass in constructor when we subume into a Jersey style service +var IN_JAR_DOC_DIR = "/server_docs" +var IN_JAR_JAVA_DOC_DIR = "$IN_JAR_DOC_DIR/javadoc" + +var LOC_WS_SPEC = "$rootDir/workspace.spec" +var LOC_DOC_HTML = "$rootDir/docshtml" + +repositories { + mavenCentral() + maven { + name = "Jitpack" + url = 'https://jitpack.io' + } + maven { + name = "Clojars" + url = "https://repo.clojars.org/" + } +} + +task buildGitCommitFile { + doLast { + def commitId = grgit.head().id + // is there a variable for builddir/classes/java/main? + file("$buildDir/classes/java/main/us/kbase/workspace/gitcommit/gitcommit").text = commitId + } +} + +compileJava { + // build needs to be java 8 compatible so jars can be used in java 8 projects + // TODO BUILD remove when we no longer support java 8, use `options.release = 11` if needed + java.sourceCompatibility = JavaVersion.VERSION_1_8 + java.targetCompatibility = JavaVersion.VERSION_1_8 + finalizedBy buildGitCommitFile +} + +javadoc { + /* We don't actually need the full javadoc for anything, so just hijack this task for + * building the client javadocs. If we ever need the full javadocs make a new task for the + * client java docs + */ + /* TODO DOCS the current sdk documentation looks like invalid html to javadoc + * need to go through and remove + * also some spots with < / > that need to be wrapped with {@code } in internal code + */ + failOnError = false + options { + links "https://docs.oracle.com/en/java/javase/11/docs/api/" + links "https://javadoc.jitpack.io/com/github/kbase/auth2_client_java/$VER_AUTH2_CLIENT/javadoc/" + links "https://javadoc.jitpack.io/com/github/kbase/java_common/$VER_JAVA_COMMON/javadoc/" + } + include "**/workspace/*.java" + exclude "**/workspace/WorkspaceServer.java" + include "**/common/service/Tuple*.java" +} + +task buildDocs { + // ideally we'd add the inputs and outputs spec but that's too much work for too little gain + dependsOn javadoc + doLast { + // need to make sure we remove any docs that no longer exist in the source + delete BUILD_OTHER_DOC_DIR + // not needed locally, fails w/o it in docker build. *shrug* + mkdir BUILD_OTHER_DOC_DIR + copy { + from LOC_WS_SPEC into BUILD_OTHER_DOC_DIR + } + copy { + from LOC_DOC_HTML into BUILD_OTHER_DOC_DIR include "*" + } + exec { + commandLine "pod2html", "--infile=$rootDir/lib/Bio/KBase/workspace/Client.pm", "--outfile=$BUILD_OTHER_DOC_DIR/workspace_perl.html" + } + exec { + commandLine "sphinx-build", "$rootDir/docsource/", BUILD_OTHER_DOC_DIR + } + delete fileTree(".").matching { include "pod2htm*.tmp" } + } +} + +tasks.withType(Test) { + /* + * TODO TEST Figure out why tests fail without this and remove. Might have something to do + * with the stfuLoggers() call in many of the tests, might kill logging for tests that + * require it + * Although it seems to make Mongo start up correctly as well which is odd + */ + forkEvery = 1 + /* + * TODO TEST split tests into mongo wrapper tests & all other tests (incl. integration). + * Set up GHA to run the non-mongo tests with a single version of mongo and run the + * mongo tests with matrixed mongo versions. Combine coverage at the end somehow + */ + systemProperty "test.cfg", "$rootDir/test.cfg" + maxHeapSize = "3G" + testLogging { + exceptionFormat = 'full' + showStandardStreams = true + } + filter { + // gradle thinks that classes annotated with @RunWith are tests + excludeTestsMatching "*Tester" + } +} + +tasks.withType(JacocoReport) { + reports { + xml.required = true + csv.required = true + } +} + +test { + finalizedBy jacocoTestReport +} + +task testQuick(type: Test) { + // for Gradle 9.0 compatibility + testClassesDirs = testing.suites.test.sources.output.classesDirs + classpath = testing.suites.test.sources.runtimeClasspath + + filter { + excludeTestsMatching "*LongTest" + } + finalizedBy "jacocoTestQuickReport" // must be a string, see TODOs at head of file +} + +task jacocoTestQuickReport(type: JacocoReport, dependsOn: testQuick) { + sourceSets sourceSets.main + executionData(testQuick) +} + +shadowJar { + // Be careful when updating jars - you may want to set the duplicates strategy to WARN + // to see if any of the jars are shadowing the others when building the fat jar, which + // has been the case in the past + // Can't include the full documentation as jitpack doesn't have sphinx installed + dependsOn javadoc + duplicatesStrategy = DuplicatesStrategy.EXCLUDE + archiveAppendix = 'test-shadow' + from sourceSets.test.output + + // don't shadow the shadow jar, don't need it and it's big + dependencies { + exclude(dependency("com.github.kbase:auth2:$VER_AUTH2_SHADOW")) + } + + enableRelocation true + relocationPrefix 'us.kbase.workspace.shadow' + + mergeServiceFiles() + + from(BUILD_JAVA_DOC_DIR) { into IN_JAR_JAVA_DOC_DIR } + from(BUILD_OTHER_DOC_DIR) { into IN_JAR_DOC_DIR } +} + +war { + dependsOn buildDocs + webXml = file('war/web.xml') + from(BUILD_JAVA_DOC_DIR) { into "/WEB-INF/classes/$IN_JAR_JAVA_DOC_DIR" } + from(BUILD_OTHER_DOC_DIR) { into "/WEB-INF/classes/$IN_JAR_DOC_DIR" } +} + +// This is a filthy hack to get jitpack.io to not try to build the war file. +// Since the war depends on buildDocs which depends on sphinx, the build will fail +// It'd be better if it didn't call assemble and just publishToMavenLocal, +// but no such luck +gradle.taskGraph.whenReady { taskGraph -> + def tasks = taskGraph.getAllTasks() + if (tasks.find {it.name == 'assemble'}) { + tasks.findAll {it.name == 'war' || it.name == "buildDocs"}.each { task -> + task.enabled = false + } + } +} + +/* SDK compile notes: + * kb-sdk starts a docker container in interactive mode. Gradle's commandLine doesn't allocate + * a tty so the command fails. + * I tried using a ProcessBuilder and + * https://docs.oracle.com/en%2Fjava%2Fjavase%2F11%2Fdocs%2Fapi%2F%2F/java.base/java/lang/ProcessBuilder.html#inheritIO() + * but that failed also with no useful output. + * + * The current solution is to precede the kb-sdk call with a script call, which either + * allocates a tty or fools kb-sdk into thinking there is one - not quite sure. + * https://man7.org/linux/man-pages/man1/script.1.html + * I tried to redirect the script log file to /dev/null with -O and --log-out but script didn't + * recognize either option, hence the delete. + * + * This is, generally speaking, a janky mess and if someone can find a better way to do this + * that'd be fantastic. + */ + + var LOC_SCRIPT_TYPESCRIPT = "./typescript" + +// TODO GRADLE is there some way to DRY these 3 compile tasks up? Not a huge deal +task sdkCompileHTML { + // We want to check in the HTML so we don't put it in the build dir + var cmd = "kb-sdk compile --html --out $LOC_DOC_HTML $LOC_WS_SPEC" + doLast { + exec { + commandLine "script", "-qefc", cmd + } + delete LOC_SCRIPT_TYPESCRIPT + } +} + +task sdkCompileLibs { + var cmd = "kb-sdk compile " + + "--out $rootDir/lib " + + "--jsclname javascript/workspace/Client " + + "--plclname Bio::KBase::workspace::Client " + + "--pyclname biokbase.workspace.client " + + "--url $DEFAULT_URL " + + LOC_WS_SPEC + doLast { + exec { + commandLine "script", "-qefc", cmd + } + delete LOC_SCRIPT_TYPESCRIPT + delete "$rootDir/lib/biokbase/workspace/authclient.py" + } +} + +task sdkCompileJava { + // TODO GRADLE is there a variable for src/main/java? + var cmd = "kb-sdk compile " + + "--java " + + "--javasrc ${project.projectDir}/src/main/java/ " + + "--javasrv " + + "--out . " + + "--url $DEFAULT_URL " + + LOC_WS_SPEC + doLast { + exec { + commandLine "script", "-qefc", cmd + } + delete LOC_SCRIPT_TYPESCRIPT + } +} + +task sdkCompile { + dependsOn sdkCompileHTML + dependsOn sdkCompileJava + dependsOn sdkCompileLibs +} + +task generateUpdateSchemaScript { + dependsOn compileJava + doLast { + def dependencies = configurations.runtimeClasspath.collect { File file -> + file.absolutePath + } + + def classpath = dependencies.join(':') + + def scriptContent = """#!/bin/sh + +CLASSPATH=$classpath + +java -cp $buildDir/classes/java/main:\$CLASSPATH us.kbase.workspace.kbase.SchemaUpdaterCLI \$@ +""" + def outfile = "$buildDir/update_workspace_database_schema" + file(outfile).text = scriptContent + file(outfile).setExecutable(true) + } +} + +task buildAll { + dependsOn buildDocs + dependsOn jar + dependsOn war + dependsOn shadowJar + dependsOn generateUpdateSchemaScript +} + +configurations { + // can't directly access testImplementation, so extend and access + testimpl.extendsFrom testImplementation +} + +publishing { + publications { + shadow(MavenPublication) { publication -> + project.shadow.component(publication) + artifactId = "workspace_deluxe-test-shadow-all" + } + } +} + +dependencies { + + // ### General application dependencies ### + + implementation 'ch.qos.logback:logback-classic:1.1.2' + implementation 'com.github.ben-manes.caffeine:caffeine:2.9.3' + implementation "com.github.kbase:auth2_client_java:$VER_AUTH2_CLIENT" + implementation("com.github.kbase:handle_service2:1.0.6") { + exclude group: 'net.java.dev.jna' // breaks shadow jar + } + implementation "com.github.kbase:java_kidl:0.1.0" + implementation("com.github.kbase:sample_service:0.2.6") { + exclude group: 'net.java.dev.jna' // breaks shadow jar + } + implementation "com.github.kbase:shock_java_client:0.2.0" + implementation 'com.google.guava:guava:14.0.1' + implementation 'commons-codec:commons-codec:1.8' + implementation 'commons-io:commons-io:2.4' + implementation "com.fasterxml.jackson.core:jackson-annotations:$VER_JACKSON" + implementation "com.fasterxml.jackson.core:jackson-databind:$VER_JACKSON" + implementation 'info.picocli:picocli:4.6.1' + implementation 'org.apache.commons:commons-lang3:3.1' + implementation 'org.apache.httpcomponents:httpclient:4.5.9' + implementation 'org.apache.kafka:kafka-clients:2.1.0' + implementation 'org.ini4j:ini4j:0.5.2' + implementation 'org.mongodb:bson:4.11.1' + implementation 'org.mongodb:bson-record-codec:4.11.1' + implementation 'org.mongodb:mongodb-driver-core:4.11.1' + implementation 'org.mongodb:mongodb-driver-sync:4.11.1' + implementation 'org.slf4j:slf4j-api:1.7.30' + + // ### Server dependencies for java_common JsonServerServlet & WorkspaceServer ### + + implementation("com.github.kbase:java_common:$VER_JAVA_COMMON") { + exclude group: 'net.java.dev.jna' // breaks shadow jar + } + // TODO DEPS Need to rework the java common logger to not use syslog4j at all since it's + // abandonware and has a ton of CVEs, even in the newer versions. + implementation "org.syslog4j:syslog4j:0.9.46" + implementation 'javax.annotation:javax.annotation-api:1.3.2' + implementation 'javax.servlet:servlet-api:2.5' + // this is OOOOOOLD. But that probably means updating java_common + implementation 'org.eclipse.jetty.aggregate:jetty-all:7.0.0.v20091005' + + // ### Amazon S3 ### + + implementation('software.amazon.awssdk:s3:2.17.214') { + exclude module: 'apache-client' + exclude module: 'netty-nio-client' + } + implementation 'software.amazon.awssdk:url-connection-client:2.17.214' + + // ### Test ### + + testImplementation 'com.arangodb:arangodb-java-driver:6.7.2' + testImplementation 'com.github.kbase:java_test_utilities:0.1.0' + testImplementation "com.github.kbase:auth2:$VER_AUTH2_SHADOW" + testImplementation 'com.github.zafarkhaja:java-semver:0.9.0' + testImplementation 'junit:junit:4.12' + testImplementation 'nl.jqno.equalsverifier:equalsverifier:3.1.10' + testImplementation 'org.mockito:mockito-core:3.0.0' +} + +task showTestClassPath { + doLast { + configurations.testimpl.each { println it } + } +} diff --git a/service/src/main/java/us/kbase/common/service/Tuple11.java b/service/src/main/java/us/kbase/common/service/Tuple11.java new file mode 100644 index 000000000..9535aa90a --- /dev/null +++ b/service/src/main/java/us/kbase/common/service/Tuple11.java @@ -0,0 +1,179 @@ +package us.kbase.common.service; + +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; + +public class Tuple11 { + private T1 e1; + private T2 e2; + private T3 e3; + private T4 e4; + private T5 e5; + private T6 e6; + private T7 e7; + private T8 e8; + private T9 e9; + private T10 e10; + private T11 e11; + private Map additionalProperties = new HashMap(); + + public T1 getE1() { + return e1; + } + + public void setE1(T1 e1) { + this.e1 = e1; + } + + public Tuple11 withE1(T1 e1) { + this.e1 = e1; + return this; + } + + public T2 getE2() { + return e2; + } + + public void setE2(T2 e2) { + this.e2 = e2; + } + + public Tuple11 withE2(T2 e2) { + this.e2 = e2; + return this; + } + + public T3 getE3() { + return e3; + } + + public void setE3(T3 e3) { + this.e3 = e3; + } + + public Tuple11 withE3(T3 e3) { + this.e3 = e3; + return this; + } + + public T4 getE4() { + return e4; + } + + public void setE4(T4 e4) { + this.e4 = e4; + } + + public Tuple11 withE4(T4 e4) { + this.e4 = e4; + return this; + } + + public T5 getE5() { + return e5; + } + + public void setE5(T5 e5) { + this.e5 = e5; + } + + public Tuple11 withE5(T5 e5) { + this.e5 = e5; + return this; + } + + public T6 getE6() { + return e6; + } + + public void setE6(T6 e6) { + this.e6 = e6; + } + + public Tuple11 withE6(T6 e6) { + this.e6 = e6; + return this; + } + + public T7 getE7() { + return e7; + } + + public void setE7(T7 e7) { + this.e7 = e7; + } + + public Tuple11 withE7(T7 e7) { + this.e7 = e7; + return this; + } + + public T8 getE8() { + return e8; + } + + public void setE8(T8 e8) { + this.e8 = e8; + } + + public Tuple11 withE8(T8 e8) { + this.e8 = e8; + return this; + } + + public T9 getE9() { + return e9; + } + + public void setE9(T9 e9) { + this.e9 = e9; + } + + public Tuple11 withE9(T9 e9) { + this.e9 = e9; + return this; + } + + public T10 getE10() { + return e10; + } + + public void setE10(T10 e10) { + this.e10 = e10; + } + + public Tuple11 withE10(T10 e10) { + this.e10 = e10; + return this; + } + + public T11 getE11() { + return e11; + } + + public void setE11(T11 e11) { + this.e11 = e11; + } + + public Tuple11 withE11(T11 e11) { + this.e11 = e11; + return this; + } + + @Override + public String toString() { + return "Tuple11 [e1=" + e1 + ", e2=" + e2 + ", e3=" + e3 + ", e4=" + e4 + ", e5=" + e5 + ", e6=" + e6 + ", e7=" + e7 + ", e8=" + e8 + ", e9=" + e9 + ", e10=" + e10 + ", e11=" + e11 + "]"; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(String name, Object value) { + this.additionalProperties.put(name, value); + } +} diff --git a/service/src/main/java/us/kbase/common/service/Tuple12.java b/service/src/main/java/us/kbase/common/service/Tuple12.java new file mode 100644 index 000000000..36396e4d1 --- /dev/null +++ b/service/src/main/java/us/kbase/common/service/Tuple12.java @@ -0,0 +1,193 @@ +package us.kbase.common.service; + +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; + +public class Tuple12 { + private T1 e1; + private T2 e2; + private T3 e3; + private T4 e4; + private T5 e5; + private T6 e6; + private T7 e7; + private T8 e8; + private T9 e9; + private T10 e10; + private T11 e11; + private T12 e12; + private Map additionalProperties = new HashMap(); + + public T1 getE1() { + return e1; + } + + public void setE1(T1 e1) { + this.e1 = e1; + } + + public Tuple12 withE1(T1 e1) { + this.e1 = e1; + return this; + } + + public T2 getE2() { + return e2; + } + + public void setE2(T2 e2) { + this.e2 = e2; + } + + public Tuple12 withE2(T2 e2) { + this.e2 = e2; + return this; + } + + public T3 getE3() { + return e3; + } + + public void setE3(T3 e3) { + this.e3 = e3; + } + + public Tuple12 withE3(T3 e3) { + this.e3 = e3; + return this; + } + + public T4 getE4() { + return e4; + } + + public void setE4(T4 e4) { + this.e4 = e4; + } + + public Tuple12 withE4(T4 e4) { + this.e4 = e4; + return this; + } + + public T5 getE5() { + return e5; + } + + public void setE5(T5 e5) { + this.e5 = e5; + } + + public Tuple12 withE5(T5 e5) { + this.e5 = e5; + return this; + } + + public T6 getE6() { + return e6; + } + + public void setE6(T6 e6) { + this.e6 = e6; + } + + public Tuple12 withE6(T6 e6) { + this.e6 = e6; + return this; + } + + public T7 getE7() { + return e7; + } + + public void setE7(T7 e7) { + this.e7 = e7; + } + + public Tuple12 withE7(T7 e7) { + this.e7 = e7; + return this; + } + + public T8 getE8() { + return e8; + } + + public void setE8(T8 e8) { + this.e8 = e8; + } + + public Tuple12 withE8(T8 e8) { + this.e8 = e8; + return this; + } + + public T9 getE9() { + return e9; + } + + public void setE9(T9 e9) { + this.e9 = e9; + } + + public Tuple12 withE9(T9 e9) { + this.e9 = e9; + return this; + } + + public T10 getE10() { + return e10; + } + + public void setE10(T10 e10) { + this.e10 = e10; + } + + public Tuple12 withE10(T10 e10) { + this.e10 = e10; + return this; + } + + public T11 getE11() { + return e11; + } + + public void setE11(T11 e11) { + this.e11 = e11; + } + + public Tuple12 withE11(T11 e11) { + this.e11 = e11; + return this; + } + + public T12 getE12() { + return e12; + } + + public void setE12(T12 e12) { + this.e12 = e12; + } + + public Tuple12 withE12(T12 e12) { + this.e12 = e12; + return this; + } + + @Override + public String toString() { + return "Tuple12 [e1=" + e1 + ", e2=" + e2 + ", e3=" + e3 + ", e4=" + e4 + ", e5=" + e5 + ", e6=" + e6 + ", e7=" + e7 + ", e8=" + e8 + ", e9=" + e9 + ", e10=" + e10 + ", e11=" + e11 + ", e12=" + e12 + "]"; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(String name, Object value) { + this.additionalProperties.put(name, value); + } +} diff --git a/service/src/main/java/us/kbase/common/service/Tuple7.java b/service/src/main/java/us/kbase/common/service/Tuple7.java new file mode 100644 index 000000000..959546037 --- /dev/null +++ b/service/src/main/java/us/kbase/common/service/Tuple7.java @@ -0,0 +1,123 @@ +package us.kbase.common.service; + +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; + +public class Tuple7 { + private T1 e1; + private T2 e2; + private T3 e3; + private T4 e4; + private T5 e5; + private T6 e6; + private T7 e7; + private Map additionalProperties = new HashMap(); + + public T1 getE1() { + return e1; + } + + public void setE1(T1 e1) { + this.e1 = e1; + } + + public Tuple7 withE1(T1 e1) { + this.e1 = e1; + return this; + } + + public T2 getE2() { + return e2; + } + + public void setE2(T2 e2) { + this.e2 = e2; + } + + public Tuple7 withE2(T2 e2) { + this.e2 = e2; + return this; + } + + public T3 getE3() { + return e3; + } + + public void setE3(T3 e3) { + this.e3 = e3; + } + + public Tuple7 withE3(T3 e3) { + this.e3 = e3; + return this; + } + + public T4 getE4() { + return e4; + } + + public void setE4(T4 e4) { + this.e4 = e4; + } + + public Tuple7 withE4(T4 e4) { + this.e4 = e4; + return this; + } + + public T5 getE5() { + return e5; + } + + public void setE5(T5 e5) { + this.e5 = e5; + } + + public Tuple7 withE5(T5 e5) { + this.e5 = e5; + return this; + } + + public T6 getE6() { + return e6; + } + + public void setE6(T6 e6) { + this.e6 = e6; + } + + public Tuple7 withE6(T6 e6) { + this.e6 = e6; + return this; + } + + public T7 getE7() { + return e7; + } + + public void setE7(T7 e7) { + this.e7 = e7; + } + + public Tuple7 withE7(T7 e7) { + this.e7 = e7; + return this; + } + + @Override + public String toString() { + return "Tuple7 [e1=" + e1 + ", e2=" + e2 + ", e3=" + e3 + ", e4=" + e4 + ", e5=" + e5 + ", e6=" + e6 + ", e7=" + e7 + "]"; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(String name, Object value) { + this.additionalProperties.put(name, value); + } +} diff --git a/service/src/main/java/us/kbase/common/service/Tuple9.java b/service/src/main/java/us/kbase/common/service/Tuple9.java new file mode 100644 index 000000000..61091a046 --- /dev/null +++ b/service/src/main/java/us/kbase/common/service/Tuple9.java @@ -0,0 +1,151 @@ +package us.kbase.common.service; + +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; + +public class Tuple9 { + private T1 e1; + private T2 e2; + private T3 e3; + private T4 e4; + private T5 e5; + private T6 e6; + private T7 e7; + private T8 e8; + private T9 e9; + private Map additionalProperties = new HashMap(); + + public T1 getE1() { + return e1; + } + + public void setE1(T1 e1) { + this.e1 = e1; + } + + public Tuple9 withE1(T1 e1) { + this.e1 = e1; + return this; + } + + public T2 getE2() { + return e2; + } + + public void setE2(T2 e2) { + this.e2 = e2; + } + + public Tuple9 withE2(T2 e2) { + this.e2 = e2; + return this; + } + + public T3 getE3() { + return e3; + } + + public void setE3(T3 e3) { + this.e3 = e3; + } + + public Tuple9 withE3(T3 e3) { + this.e3 = e3; + return this; + } + + public T4 getE4() { + return e4; + } + + public void setE4(T4 e4) { + this.e4 = e4; + } + + public Tuple9 withE4(T4 e4) { + this.e4 = e4; + return this; + } + + public T5 getE5() { + return e5; + } + + public void setE5(T5 e5) { + this.e5 = e5; + } + + public Tuple9 withE5(T5 e5) { + this.e5 = e5; + return this; + } + + public T6 getE6() { + return e6; + } + + public void setE6(T6 e6) { + this.e6 = e6; + } + + public Tuple9 withE6(T6 e6) { + this.e6 = e6; + return this; + } + + public T7 getE7() { + return e7; + } + + public void setE7(T7 e7) { + this.e7 = e7; + } + + public Tuple9 withE7(T7 e7) { + this.e7 = e7; + return this; + } + + public T8 getE8() { + return e8; + } + + public void setE8(T8 e8) { + this.e8 = e8; + } + + public Tuple9 withE8(T8 e8) { + this.e8 = e8; + return this; + } + + public T9 getE9() { + return e9; + } + + public void setE9(T9 e9) { + this.e9 = e9; + } + + public Tuple9 withE9(T9 e9) { + this.e9 = e9; + return this; + } + + @Override + public String toString() { + return "Tuple9 [e1=" + e1 + ", e2=" + e2 + ", e3=" + e3 + ", e4=" + e4 + ", e5=" + e5 + ", e6=" + e6 + ", e7=" + e7 + ", e8=" + e8 + ", e9=" + e9 + "]"; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(String name, Object value) { + this.additionalProperties.put(name, value); + } +} diff --git a/src/us/kbase/common/utils/Counter.java b/service/src/main/java/us/kbase/common/utils/Counter.java similarity index 100% rename from src/us/kbase/common/utils/Counter.java rename to service/src/main/java/us/kbase/common/utils/Counter.java diff --git a/src/us/kbase/common/utils/SizeUtils.java b/service/src/main/java/us/kbase/common/utils/SizeUtils.java similarity index 100% rename from src/us/kbase/common/utils/SizeUtils.java rename to service/src/main/java/us/kbase/common/utils/SizeUtils.java diff --git a/src/us/kbase/typedobj/core/AbsoluteTypeDefId.java b/service/src/main/java/us/kbase/typedobj/core/AbsoluteTypeDefId.java similarity index 100% rename from src/us/kbase/typedobj/core/AbsoluteTypeDefId.java rename to service/src/main/java/us/kbase/typedobj/core/AbsoluteTypeDefId.java diff --git a/src/us/kbase/typedobj/core/ExtractedMetadata.java b/service/src/main/java/us/kbase/typedobj/core/ExtractedMetadata.java similarity index 100% rename from src/us/kbase/typedobj/core/ExtractedMetadata.java rename to service/src/main/java/us/kbase/typedobj/core/ExtractedMetadata.java diff --git a/src/us/kbase/typedobj/core/IdRefTokenSequenceProvider.java b/service/src/main/java/us/kbase/typedobj/core/IdRefTokenSequenceProvider.java similarity index 100% rename from src/us/kbase/typedobj/core/IdRefTokenSequenceProvider.java rename to service/src/main/java/us/kbase/typedobj/core/IdRefTokenSequenceProvider.java diff --git a/src/us/kbase/typedobj/core/JsonDocumentLocation.java b/service/src/main/java/us/kbase/typedobj/core/JsonDocumentLocation.java similarity index 100% rename from src/us/kbase/typedobj/core/JsonDocumentLocation.java rename to service/src/main/java/us/kbase/typedobj/core/JsonDocumentLocation.java diff --git a/src/us/kbase/typedobj/core/JsonPointerParseException.java b/service/src/main/java/us/kbase/typedobj/core/JsonPointerParseException.java similarity index 100% rename from src/us/kbase/typedobj/core/JsonPointerParseException.java rename to service/src/main/java/us/kbase/typedobj/core/JsonPointerParseException.java diff --git a/src/us/kbase/typedobj/core/JsonTokenStreamWriter.java b/service/src/main/java/us/kbase/typedobj/core/JsonTokenStreamWriter.java similarity index 100% rename from src/us/kbase/typedobj/core/JsonTokenStreamWriter.java rename to service/src/main/java/us/kbase/typedobj/core/JsonTokenStreamWriter.java diff --git a/src/us/kbase/typedobj/core/JsonTokenValidationException.java b/service/src/main/java/us/kbase/typedobj/core/JsonTokenValidationException.java similarity index 100% rename from src/us/kbase/typedobj/core/JsonTokenValidationException.java rename to service/src/main/java/us/kbase/typedobj/core/JsonTokenValidationException.java diff --git a/src/us/kbase/typedobj/core/JsonTokenValidationListener.java b/service/src/main/java/us/kbase/typedobj/core/JsonTokenValidationListener.java similarity index 100% rename from src/us/kbase/typedobj/core/JsonTokenValidationListener.java rename to service/src/main/java/us/kbase/typedobj/core/JsonTokenValidationListener.java diff --git a/src/us/kbase/typedobj/core/JsonTokenValidationSchema.java b/service/src/main/java/us/kbase/typedobj/core/JsonTokenValidationSchema.java similarity index 100% rename from src/us/kbase/typedobj/core/JsonTokenValidationSchema.java rename to service/src/main/java/us/kbase/typedobj/core/JsonTokenValidationSchema.java diff --git a/src/us/kbase/typedobj/core/LocalTypeProvider.java b/service/src/main/java/us/kbase/typedobj/core/LocalTypeProvider.java similarity index 100% rename from src/us/kbase/typedobj/core/LocalTypeProvider.java rename to service/src/main/java/us/kbase/typedobj/core/LocalTypeProvider.java diff --git a/src/us/kbase/typedobj/core/MD5.java b/service/src/main/java/us/kbase/typedobj/core/MD5.java similarity index 100% rename from src/us/kbase/typedobj/core/MD5.java rename to service/src/main/java/us/kbase/typedobj/core/MD5.java diff --git a/src/us/kbase/typedobj/core/MetadataExtractionHandler.java b/service/src/main/java/us/kbase/typedobj/core/MetadataExtractionHandler.java similarity index 100% rename from src/us/kbase/typedobj/core/MetadataExtractionHandler.java rename to service/src/main/java/us/kbase/typedobj/core/MetadataExtractionHandler.java diff --git a/src/us/kbase/typedobj/core/MetadataExtractor.java b/service/src/main/java/us/kbase/typedobj/core/MetadataExtractor.java similarity index 100% rename from src/us/kbase/typedobj/core/MetadataExtractor.java rename to service/src/main/java/us/kbase/typedobj/core/MetadataExtractor.java diff --git a/src/us/kbase/typedobj/core/MetadataNode.java b/service/src/main/java/us/kbase/typedobj/core/MetadataNode.java similarity index 100% rename from src/us/kbase/typedobj/core/MetadataNode.java rename to service/src/main/java/us/kbase/typedobj/core/MetadataNode.java diff --git a/src/us/kbase/typedobj/core/NullJsonGenerator.java b/service/src/main/java/us/kbase/typedobj/core/NullJsonGenerator.java similarity index 99% rename from src/us/kbase/typedobj/core/NullJsonGenerator.java rename to service/src/main/java/us/kbase/typedobj/core/NullJsonGenerator.java index 37c45470a..ecc57981a 100644 --- a/src/us/kbase/typedobj/core/NullJsonGenerator.java +++ b/service/src/main/java/us/kbase/typedobj/core/NullJsonGenerator.java @@ -240,6 +240,7 @@ public int getFeatureMask() { } @Override + @Deprecated public JsonGenerator setFeatureMask(int values) { return null; } diff --git a/src/us/kbase/typedobj/core/Restreamable.java b/service/src/main/java/us/kbase/typedobj/core/Restreamable.java similarity index 100% rename from src/us/kbase/typedobj/core/Restreamable.java rename to service/src/main/java/us/kbase/typedobj/core/Restreamable.java diff --git a/src/us/kbase/typedobj/core/SubdataExtractionNode.java b/service/src/main/java/us/kbase/typedobj/core/SubdataExtractionNode.java similarity index 100% rename from src/us/kbase/typedobj/core/SubdataExtractionNode.java rename to service/src/main/java/us/kbase/typedobj/core/SubdataExtractionNode.java diff --git a/src/us/kbase/typedobj/core/SubdataExtractor.java b/service/src/main/java/us/kbase/typedobj/core/SubdataExtractor.java similarity index 100% rename from src/us/kbase/typedobj/core/SubdataExtractor.java rename to service/src/main/java/us/kbase/typedobj/core/SubdataExtractor.java diff --git a/src/us/kbase/typedobj/core/SubsetSelection.java b/service/src/main/java/us/kbase/typedobj/core/SubsetSelection.java similarity index 100% rename from src/us/kbase/typedobj/core/SubsetSelection.java rename to service/src/main/java/us/kbase/typedobj/core/SubsetSelection.java diff --git a/src/us/kbase/typedobj/core/TempFileListener.java b/service/src/main/java/us/kbase/typedobj/core/TempFileListener.java similarity index 100% rename from src/us/kbase/typedobj/core/TempFileListener.java rename to service/src/main/java/us/kbase/typedobj/core/TempFileListener.java diff --git a/src/us/kbase/typedobj/core/TempFilesManager.java b/service/src/main/java/us/kbase/typedobj/core/TempFilesManager.java similarity index 100% rename from src/us/kbase/typedobj/core/TempFilesManager.java rename to service/src/main/java/us/kbase/typedobj/core/TempFilesManager.java diff --git a/src/us/kbase/typedobj/core/TokenSequenceProvider.java b/service/src/main/java/us/kbase/typedobj/core/TokenSequenceProvider.java similarity index 100% rename from src/us/kbase/typedobj/core/TokenSequenceProvider.java rename to service/src/main/java/us/kbase/typedobj/core/TokenSequenceProvider.java diff --git a/src/us/kbase/typedobj/core/TypeDefId.java b/service/src/main/java/us/kbase/typedobj/core/TypeDefId.java similarity index 100% rename from src/us/kbase/typedobj/core/TypeDefId.java rename to service/src/main/java/us/kbase/typedobj/core/TypeDefId.java diff --git a/src/us/kbase/typedobj/core/TypeDefName.java b/service/src/main/java/us/kbase/typedobj/core/TypeDefName.java similarity index 100% rename from src/us/kbase/typedobj/core/TypeDefName.java rename to service/src/main/java/us/kbase/typedobj/core/TypeDefName.java diff --git a/src/us/kbase/typedobj/core/TypeProvider.java b/service/src/main/java/us/kbase/typedobj/core/TypeProvider.java similarity index 100% rename from src/us/kbase/typedobj/core/TypeProvider.java rename to service/src/main/java/us/kbase/typedobj/core/TypeProvider.java diff --git a/src/us/kbase/typedobj/core/TypedObjectValidator.java b/service/src/main/java/us/kbase/typedobj/core/TypedObjectValidator.java similarity index 100% rename from src/us/kbase/typedobj/core/TypedObjectValidator.java rename to service/src/main/java/us/kbase/typedobj/core/TypedObjectValidator.java diff --git a/src/us/kbase/typedobj/core/ValidatedTypedObject.java b/service/src/main/java/us/kbase/typedobj/core/ValidatedTypedObject.java similarity index 100% rename from src/us/kbase/typedobj/core/ValidatedTypedObject.java rename to service/src/main/java/us/kbase/typedobj/core/ValidatedTypedObject.java diff --git a/src/us/kbase/typedobj/db/FileTypeStorage.java b/service/src/main/java/us/kbase/typedobj/db/FileTypeStorage.java similarity index 100% rename from src/us/kbase/typedobj/db/FileTypeStorage.java rename to service/src/main/java/us/kbase/typedobj/db/FileTypeStorage.java diff --git a/src/us/kbase/typedobj/db/FuncDetailedInfo.java b/service/src/main/java/us/kbase/typedobj/db/FuncDetailedInfo.java similarity index 100% rename from src/us/kbase/typedobj/db/FuncDetailedInfo.java rename to service/src/main/java/us/kbase/typedobj/db/FuncDetailedInfo.java diff --git a/src/us/kbase/typedobj/db/FuncInfo.java b/service/src/main/java/us/kbase/typedobj/db/FuncInfo.java similarity index 100% rename from src/us/kbase/typedobj/db/FuncInfo.java rename to service/src/main/java/us/kbase/typedobj/db/FuncInfo.java diff --git a/src/us/kbase/typedobj/db/KidlUtil.java b/service/src/main/java/us/kbase/typedobj/db/KidlUtil.java similarity index 76% rename from src/us/kbase/typedobj/db/KidlUtil.java rename to service/src/main/java/us/kbase/typedobj/db/KidlUtil.java index 02bfc00a6..d90b675c2 100644 --- a/src/us/kbase/typedobj/db/KidlUtil.java +++ b/service/src/main/java/us/kbase/typedobj/db/KidlUtil.java @@ -1,8 +1,5 @@ package us.kbase.typedobj.db; -import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; - import java.io.BufferedReader; import java.io.IOException; import java.io.StringReader; @@ -37,30 +34,6 @@ public static boolean compareJson(Map parse1, Map parse2, String hea return ok; } - public static boolean compareJsonSchemas(Map> schemas1, - Map> schemas2, String header) throws IOException, - JsonParseException, JsonMappingException, JsonGenerationException, - Exception { - boolean ok = true; - assertThat(schemas1.keySet(), is(schemas2.keySet())); - for (String moduleName : schemas1.keySet()) { - assertThat(schemas1.get(moduleName).keySet(), is(schemas2.get(moduleName).keySet())); - for (Map.Entry entry : schemas1.get(moduleName).entrySet()) { - String schema1 = rewriteJson(entry.getValue()); - String schema2 = rewriteJson(schemas2.get(moduleName).get(entry.getKey())); - if (!schema1.equals(schema2)) { - ok = false; - System.out.println(header + " (" + moduleName + "." + entry.getKey() + "):"); - System.out.println("--------------------------------------------------------"); - showDiff(schema1, schema2); - System.out.println(); - System.out.println("*"); - } - } - } - return ok; - } - private static void showDiff(String origText, String newText) throws Exception { List origLn = getLines(origText); List newLn = getLines(newText); diff --git a/src/us/kbase/typedobj/db/ModuleDefId.java b/service/src/main/java/us/kbase/typedobj/db/ModuleDefId.java similarity index 100% rename from src/us/kbase/typedobj/db/ModuleDefId.java rename to service/src/main/java/us/kbase/typedobj/db/ModuleDefId.java diff --git a/src/us/kbase/typedobj/db/ModuleInfo.java b/service/src/main/java/us/kbase/typedobj/db/ModuleInfo.java similarity index 100% rename from src/us/kbase/typedobj/db/ModuleInfo.java rename to service/src/main/java/us/kbase/typedobj/db/ModuleInfo.java diff --git a/src/us/kbase/typedobj/db/MongoTypeStorage.java b/service/src/main/java/us/kbase/typedobj/db/MongoTypeStorage.java similarity index 100% rename from src/us/kbase/typedobj/db/MongoTypeStorage.java rename to service/src/main/java/us/kbase/typedobj/db/MongoTypeStorage.java diff --git a/src/us/kbase/typedobj/db/OwnerInfo.java b/service/src/main/java/us/kbase/typedobj/db/OwnerInfo.java similarity index 100% rename from src/us/kbase/typedobj/db/OwnerInfo.java rename to service/src/main/java/us/kbase/typedobj/db/OwnerInfo.java diff --git a/src/us/kbase/typedobj/db/RefInfo.java b/service/src/main/java/us/kbase/typedobj/db/RefInfo.java similarity index 100% rename from src/us/kbase/typedobj/db/RefInfo.java rename to service/src/main/java/us/kbase/typedobj/db/RefInfo.java diff --git a/src/us/kbase/typedobj/db/SemanticVersion.java b/service/src/main/java/us/kbase/typedobj/db/SemanticVersion.java similarity index 100% rename from src/us/kbase/typedobj/db/SemanticVersion.java rename to service/src/main/java/us/kbase/typedobj/db/SemanticVersion.java diff --git a/src/us/kbase/typedobj/db/TypeChange.java b/service/src/main/java/us/kbase/typedobj/db/TypeChange.java similarity index 100% rename from src/us/kbase/typedobj/db/TypeChange.java rename to service/src/main/java/us/kbase/typedobj/db/TypeChange.java diff --git a/src/us/kbase/typedobj/db/TypeDefinitionDB.java b/service/src/main/java/us/kbase/typedobj/db/TypeDefinitionDB.java similarity index 100% rename from src/us/kbase/typedobj/db/TypeDefinitionDB.java rename to service/src/main/java/us/kbase/typedobj/db/TypeDefinitionDB.java diff --git a/src/us/kbase/typedobj/db/TypeDetailedInfo.java b/service/src/main/java/us/kbase/typedobj/db/TypeDetailedInfo.java similarity index 100% rename from src/us/kbase/typedobj/db/TypeDetailedInfo.java rename to service/src/main/java/us/kbase/typedobj/db/TypeDetailedInfo.java diff --git a/src/us/kbase/typedobj/db/TypeInfo.java b/service/src/main/java/us/kbase/typedobj/db/TypeInfo.java similarity index 100% rename from src/us/kbase/typedobj/db/TypeInfo.java rename to service/src/main/java/us/kbase/typedobj/db/TypeInfo.java diff --git a/src/us/kbase/typedobj/db/TypeStorage.java b/service/src/main/java/us/kbase/typedobj/db/TypeStorage.java similarity index 100% rename from src/us/kbase/typedobj/db/TypeStorage.java rename to service/src/main/java/us/kbase/typedobj/db/TypeStorage.java diff --git a/src/us/kbase/typedobj/exceptions/ExceededMaxMetadataSizeException.java b/service/src/main/java/us/kbase/typedobj/exceptions/ExceededMaxMetadataSizeException.java similarity index 100% rename from src/us/kbase/typedobj/exceptions/ExceededMaxMetadataSizeException.java rename to service/src/main/java/us/kbase/typedobj/exceptions/ExceededMaxMetadataSizeException.java diff --git a/src/us/kbase/typedobj/exceptions/ExceededMaxSubsetSizeException.java b/service/src/main/java/us/kbase/typedobj/exceptions/ExceededMaxSubsetSizeException.java similarity index 100% rename from src/us/kbase/typedobj/exceptions/ExceededMaxSubsetSizeException.java rename to service/src/main/java/us/kbase/typedobj/exceptions/ExceededMaxSubsetSizeException.java diff --git a/src/us/kbase/typedobj/exceptions/NoSuchFuncException.java b/service/src/main/java/us/kbase/typedobj/exceptions/NoSuchFuncException.java similarity index 100% rename from src/us/kbase/typedobj/exceptions/NoSuchFuncException.java rename to service/src/main/java/us/kbase/typedobj/exceptions/NoSuchFuncException.java diff --git a/src/us/kbase/typedobj/exceptions/NoSuchModuleException.java b/service/src/main/java/us/kbase/typedobj/exceptions/NoSuchModuleException.java similarity index 100% rename from src/us/kbase/typedobj/exceptions/NoSuchModuleException.java rename to service/src/main/java/us/kbase/typedobj/exceptions/NoSuchModuleException.java diff --git a/src/us/kbase/typedobj/exceptions/NoSuchPrivilegeException.java b/service/src/main/java/us/kbase/typedobj/exceptions/NoSuchPrivilegeException.java similarity index 100% rename from src/us/kbase/typedobj/exceptions/NoSuchPrivilegeException.java rename to service/src/main/java/us/kbase/typedobj/exceptions/NoSuchPrivilegeException.java diff --git a/src/us/kbase/typedobj/exceptions/NoSuchTypeException.java b/service/src/main/java/us/kbase/typedobj/exceptions/NoSuchTypeException.java similarity index 100% rename from src/us/kbase/typedobj/exceptions/NoSuchTypeException.java rename to service/src/main/java/us/kbase/typedobj/exceptions/NoSuchTypeException.java diff --git a/src/us/kbase/typedobj/exceptions/SpecParseException.java b/service/src/main/java/us/kbase/typedobj/exceptions/SpecParseException.java similarity index 100% rename from src/us/kbase/typedobj/exceptions/SpecParseException.java rename to service/src/main/java/us/kbase/typedobj/exceptions/SpecParseException.java diff --git a/src/us/kbase/typedobj/exceptions/TypeStorageException.java b/service/src/main/java/us/kbase/typedobj/exceptions/TypeStorageException.java similarity index 100% rename from src/us/kbase/typedobj/exceptions/TypeStorageException.java rename to service/src/main/java/us/kbase/typedobj/exceptions/TypeStorageException.java diff --git a/src/us/kbase/typedobj/exceptions/TypedObjectException.java b/service/src/main/java/us/kbase/typedobj/exceptions/TypedObjectException.java similarity index 100% rename from src/us/kbase/typedobj/exceptions/TypedObjectException.java rename to service/src/main/java/us/kbase/typedobj/exceptions/TypedObjectException.java diff --git a/src/us/kbase/typedobj/exceptions/TypedObjectExtractionException.java b/service/src/main/java/us/kbase/typedobj/exceptions/TypedObjectExtractionException.java similarity index 100% rename from src/us/kbase/typedobj/exceptions/TypedObjectExtractionException.java rename to service/src/main/java/us/kbase/typedobj/exceptions/TypedObjectExtractionException.java diff --git a/src/us/kbase/typedobj/exceptions/TypedObjectSchemaException.java b/service/src/main/java/us/kbase/typedobj/exceptions/TypedObjectSchemaException.java similarity index 100% rename from src/us/kbase/typedobj/exceptions/TypedObjectSchemaException.java rename to service/src/main/java/us/kbase/typedobj/exceptions/TypedObjectSchemaException.java diff --git a/src/us/kbase/typedobj/exceptions/TypedObjectValidationException.java b/service/src/main/java/us/kbase/typedobj/exceptions/TypedObjectValidationException.java similarity index 100% rename from src/us/kbase/typedobj/exceptions/TypedObjectValidationException.java rename to service/src/main/java/us/kbase/typedobj/exceptions/TypedObjectValidationException.java diff --git a/src/us/kbase/typedobj/idref/DefaultRemappedId.java b/service/src/main/java/us/kbase/typedobj/idref/DefaultRemappedId.java similarity index 100% rename from src/us/kbase/typedobj/idref/DefaultRemappedId.java rename to service/src/main/java/us/kbase/typedobj/idref/DefaultRemappedId.java diff --git a/src/us/kbase/typedobj/idref/IdReference.java b/service/src/main/java/us/kbase/typedobj/idref/IdReference.java similarity index 100% rename from src/us/kbase/typedobj/idref/IdReference.java rename to service/src/main/java/us/kbase/typedobj/idref/IdReference.java diff --git a/src/us/kbase/typedobj/idref/IdReferenceHandlerSet.java b/service/src/main/java/us/kbase/typedobj/idref/IdReferenceHandlerSet.java similarity index 100% rename from src/us/kbase/typedobj/idref/IdReferenceHandlerSet.java rename to service/src/main/java/us/kbase/typedobj/idref/IdReferenceHandlerSet.java diff --git a/src/us/kbase/typedobj/idref/IdReferenceHandlerSetFactory.java b/service/src/main/java/us/kbase/typedobj/idref/IdReferenceHandlerSetFactory.java similarity index 100% rename from src/us/kbase/typedobj/idref/IdReferenceHandlerSetFactory.java rename to service/src/main/java/us/kbase/typedobj/idref/IdReferenceHandlerSetFactory.java diff --git a/src/us/kbase/typedobj/idref/IdReferenceHandlerSetFactoryBuilder.java b/service/src/main/java/us/kbase/typedobj/idref/IdReferenceHandlerSetFactoryBuilder.java similarity index 100% rename from src/us/kbase/typedobj/idref/IdReferenceHandlerSetFactoryBuilder.java rename to service/src/main/java/us/kbase/typedobj/idref/IdReferenceHandlerSetFactoryBuilder.java diff --git a/src/us/kbase/typedobj/idref/IdReferencePermissionHandlerSet.java b/service/src/main/java/us/kbase/typedobj/idref/IdReferencePermissionHandlerSet.java similarity index 100% rename from src/us/kbase/typedobj/idref/IdReferencePermissionHandlerSet.java rename to service/src/main/java/us/kbase/typedobj/idref/IdReferencePermissionHandlerSet.java diff --git a/src/us/kbase/typedobj/idref/IdReferenceType.java b/service/src/main/java/us/kbase/typedobj/idref/IdReferenceType.java similarity index 100% rename from src/us/kbase/typedobj/idref/IdReferenceType.java rename to service/src/main/java/us/kbase/typedobj/idref/IdReferenceType.java diff --git a/src/us/kbase/typedobj/idref/NoSuchIdReferenceHandlerException.java b/service/src/main/java/us/kbase/typedobj/idref/NoSuchIdReferenceHandlerException.java similarity index 100% rename from src/us/kbase/typedobj/idref/NoSuchIdReferenceHandlerException.java rename to service/src/main/java/us/kbase/typedobj/idref/NoSuchIdReferenceHandlerException.java diff --git a/src/us/kbase/typedobj/idref/RemappedId.java b/service/src/main/java/us/kbase/typedobj/idref/RemappedId.java similarity index 100% rename from src/us/kbase/typedobj/idref/RemappedId.java rename to service/src/main/java/us/kbase/typedobj/idref/RemappedId.java diff --git a/src/us/kbase/typedobj/idref/SimpleRemappedId.java b/service/src/main/java/us/kbase/typedobj/idref/SimpleRemappedId.java similarity index 100% rename from src/us/kbase/typedobj/idref/SimpleRemappedId.java rename to service/src/main/java/us/kbase/typedobj/idref/SimpleRemappedId.java diff --git a/service/src/main/java/us/kbase/workspace/AlterAdminObjectMetadataParams.java b/service/src/main/java/us/kbase/workspace/AlterAdminObjectMetadataParams.java new file mode 100644 index 000000000..62c056ca7 --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/AlterAdminObjectMetadataParams.java @@ -0,0 +1,66 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: AlterAdminObjectMetadataParams

+ *
+ * Input parameters for the alter_admin_object_metadata method.
+ *         updates - the metadata updates to apply to the objects. If the same object is specified
+ *                 twice in the list, the update order is unspecified. At most 1000 updates are allowed
+ *                 in one call.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "updates" +}) +public class AlterAdminObjectMetadataParams { + + @JsonProperty("updates") + private List updates; + private Map additionalProperties = new HashMap(); + + @JsonProperty("updates") + public List getUpdates() { + return updates; + } + + @JsonProperty("updates") + public void setUpdates(List updates) { + this.updates = updates; + } + + public AlterAdminObjectMetadataParams withUpdates(List updates) { + this.updates = updates; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + return ((((("AlterAdminObjectMetadataParams"+" [updates=")+ updates)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/AlterWorkspaceMetadataParams.java b/service/src/main/java/us/kbase/workspace/AlterWorkspaceMetadataParams.java new file mode 100644 index 000000000..c063c903f --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/AlterWorkspaceMetadataParams.java @@ -0,0 +1,136 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: AlterWorkspaceMetadataParams

+ *
+ * Input parameters for the "alter_workspace_metadata" function.
+ *                 Required arguments:
+ *                 WorkspaceIdentity wsi - the workspace to be altered
+ *                 One or both of the following arguments are required:
+ *                 usermeta new - metadata to assign to the workspace. Duplicate keys will
+ *                         be overwritten.
+ *                 list remove - these keys will be removed from the workspace
+ *                         metadata key/value pairs.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "wsi", + "new", + "remove" +}) +public class AlterWorkspaceMetadataParams { + + /** + *

Original spec-file type: WorkspaceIdentity

+ *
+     * A workspace identifier.
+     *                 Select a workspace by one, and only one, of the numerical id or name.
+     *                 ws_id id - the numerical ID of the workspace.
+     *                 ws_name workspace - the name of the workspace.
+     * 
+ * + */ + @JsonProperty("wsi") + private WorkspaceIdentity wsi; + @JsonProperty("new") + private Map _new; + @JsonProperty("remove") + private List remove; + private Map additionalProperties = new HashMap(); + + /** + *

Original spec-file type: WorkspaceIdentity

+ *
+     * A workspace identifier.
+     *                 Select a workspace by one, and only one, of the numerical id or name.
+     *                 ws_id id - the numerical ID of the workspace.
+     *                 ws_name workspace - the name of the workspace.
+     * 
+ * + */ + @JsonProperty("wsi") + public WorkspaceIdentity getWsi() { + return wsi; + } + + /** + *

Original spec-file type: WorkspaceIdentity

+ *
+     * A workspace identifier.
+     *                 Select a workspace by one, and only one, of the numerical id or name.
+     *                 ws_id id - the numerical ID of the workspace.
+     *                 ws_name workspace - the name of the workspace.
+     * 
+ * + */ + @JsonProperty("wsi") + public void setWsi(WorkspaceIdentity wsi) { + this.wsi = wsi; + } + + public AlterWorkspaceMetadataParams withWsi(WorkspaceIdentity wsi) { + this.wsi = wsi; + return this; + } + + @JsonProperty("new") + public Map getNew() { + return _new; + } + + @JsonProperty("new") + public void setNew(Map _new) { + this._new = _new; + } + + public AlterWorkspaceMetadataParams withNew(Map _new) { + this._new = _new; + return this; + } + + @JsonProperty("remove") + public List getRemove() { + return remove; + } + + @JsonProperty("remove") + public void setRemove(List remove) { + this.remove = remove; + } + + public AlterWorkspaceMetadataParams withRemove(List remove) { + this.remove = remove; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(java.lang.String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public java.lang.String toString() { + return ((((((((("AlterWorkspaceMetadataParams"+" [wsi=")+ wsi)+", _new=")+ _new)+", remove=")+ remove)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/CloneWorkspaceParams.java b/service/src/main/java/us/kbase/workspace/CloneWorkspaceParams.java new file mode 100644 index 000000000..44f6e73a7 --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/CloneWorkspaceParams.java @@ -0,0 +1,200 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: CloneWorkspaceParams

+ *
+ * Input parameters for the "clone_workspace" function.
+ *                 Note that deleted objects are not cloned, although hidden objects are
+ *                 and remain hidden in the new workspace.
+ *                 Required arguments:
+ *                 WorkspaceIdentity wsi - the workspace to be cloned.
+ *                 ws_name workspace - name of the workspace to be cloned into. This must
+ *                         be a non-existant workspace name.
+ *                 Optional arguments:
+ *                 permission globalread - 'r' to set the new workspace globally readable,
+ *                         default 'n'.
+ *                 string description - A free-text description of the new workspace, 1000
+ *                         characters max. Longer strings will be mercilessly and brutally
+ *                         truncated.
+ *                 usermeta meta - arbitrary user-supplied metadata for the workspace.
+ *                 list exclude - exclude the specified objects from the
+ *                         cloned workspace. Either an object ID or a object name must be
+ *                         specified in each ObjectIdentity - any supplied reference strings,
+ *                         workspace names or IDs, and versions are ignored.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "wsi", + "workspace", + "globalread", + "description", + "meta", + "exclude" +}) +public class CloneWorkspaceParams { + + /** + *

Original spec-file type: WorkspaceIdentity

+ *
+     * A workspace identifier.
+     *                 Select a workspace by one, and only one, of the numerical id or name.
+     *                 ws_id id - the numerical ID of the workspace.
+     *                 ws_name workspace - the name of the workspace.
+     * 
+ * + */ + @JsonProperty("wsi") + private WorkspaceIdentity wsi; + @JsonProperty("workspace") + private java.lang.String workspace; + @JsonProperty("globalread") + private java.lang.String globalread; + @JsonProperty("description") + private java.lang.String description; + @JsonProperty("meta") + private Map meta; + @JsonProperty("exclude") + private List exclude; + private Map additionalProperties = new HashMap(); + + /** + *

Original spec-file type: WorkspaceIdentity

+ *
+     * A workspace identifier.
+     *                 Select a workspace by one, and only one, of the numerical id or name.
+     *                 ws_id id - the numerical ID of the workspace.
+     *                 ws_name workspace - the name of the workspace.
+     * 
+ * + */ + @JsonProperty("wsi") + public WorkspaceIdentity getWsi() { + return wsi; + } + + /** + *

Original spec-file type: WorkspaceIdentity

+ *
+     * A workspace identifier.
+     *                 Select a workspace by one, and only one, of the numerical id or name.
+     *                 ws_id id - the numerical ID of the workspace.
+     *                 ws_name workspace - the name of the workspace.
+     * 
+ * + */ + @JsonProperty("wsi") + public void setWsi(WorkspaceIdentity wsi) { + this.wsi = wsi; + } + + public CloneWorkspaceParams withWsi(WorkspaceIdentity wsi) { + this.wsi = wsi; + return this; + } + + @JsonProperty("workspace") + public java.lang.String getWorkspace() { + return workspace; + } + + @JsonProperty("workspace") + public void setWorkspace(java.lang.String workspace) { + this.workspace = workspace; + } + + public CloneWorkspaceParams withWorkspace(java.lang.String workspace) { + this.workspace = workspace; + return this; + } + + @JsonProperty("globalread") + public java.lang.String getGlobalread() { + return globalread; + } + + @JsonProperty("globalread") + public void setGlobalread(java.lang.String globalread) { + this.globalread = globalread; + } + + public CloneWorkspaceParams withGlobalread(java.lang.String globalread) { + this.globalread = globalread; + return this; + } + + @JsonProperty("description") + public java.lang.String getDescription() { + return description; + } + + @JsonProperty("description") + public void setDescription(java.lang.String description) { + this.description = description; + } + + public CloneWorkspaceParams withDescription(java.lang.String description) { + this.description = description; + return this; + } + + @JsonProperty("meta") + public Map getMeta() { + return meta; + } + + @JsonProperty("meta") + public void setMeta(Map meta) { + this.meta = meta; + } + + public CloneWorkspaceParams withMeta(Map meta) { + this.meta = meta; + return this; + } + + @JsonProperty("exclude") + public List getExclude() { + return exclude; + } + + @JsonProperty("exclude") + public void setExclude(List exclude) { + this.exclude = exclude; + } + + public CloneWorkspaceParams withExclude(List exclude) { + this.exclude = exclude; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(java.lang.String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public java.lang.String toString() { + return ((((((((((((((("CloneWorkspaceParams"+" [wsi=")+ wsi)+", workspace=")+ workspace)+", globalread=")+ globalread)+", description=")+ description)+", meta=")+ meta)+", exclude=")+ exclude)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/CopyObjectParams.java b/service/src/main/java/us/kbase/workspace/CopyObjectParams.java new file mode 100644 index 000000000..2a1ecab67 --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/CopyObjectParams.java @@ -0,0 +1,202 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: CopyObjectParams

+ *
+ * Input parameters for the 'copy_object' function.
+ *                 If the 'from' ObjectIdentity includes no version and the object is
+ *                 copied to a new name, the entire version history of the object is
+ *                 copied. In all other cases only the version specified, or the latest
+ *                 version if no version is specified, is copied.
+ *                 The version from the 'to' ObjectIdentity is always ignored.
+ *                 Required arguments:
+ *                 ObjectIdentity from - the object to copy.
+ *                 ObjectIdentity to - where to copy the object.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "from", + "to" +}) +public class CopyObjectParams { + + /** + *

Original spec-file type: ObjectIdentity

+ *
+     * An object identifier.
+     *                 Select an object by either:
+     *                         One, and only one, of the numerical id or name of the workspace.
+     *                                 ws_id wsid - the numerical ID of the workspace.
+     *                                 ws_name workspace - the name of the workspace.
+     *                         AND
+     *                         One, and only one, of the numerical id or name of the object.
+     *                                 obj_id objid- the numerical ID of the object.
+     *                                 obj_name name - name of the object.
+     *                         OPTIONALLY
+     *                                 obj_ver ver - the version of the object.
+     *                 OR an object reference string:
+     *                         obj_ref ref - an object reference string.
+     * 
+ * + */ + @JsonProperty("from") + private ObjectIdentity from; + /** + *

Original spec-file type: ObjectIdentity

+ *
+     * An object identifier.
+     *                 Select an object by either:
+     *                         One, and only one, of the numerical id or name of the workspace.
+     *                                 ws_id wsid - the numerical ID of the workspace.
+     *                                 ws_name workspace - the name of the workspace.
+     *                         AND
+     *                         One, and only one, of the numerical id or name of the object.
+     *                                 obj_id objid- the numerical ID of the object.
+     *                                 obj_name name - name of the object.
+     *                         OPTIONALLY
+     *                                 obj_ver ver - the version of the object.
+     *                 OR an object reference string:
+     *                         obj_ref ref - an object reference string.
+     * 
+ * + */ + @JsonProperty("to") + private ObjectIdentity to; + private Map additionalProperties = new HashMap(); + + /** + *

Original spec-file type: ObjectIdentity

+ *
+     * An object identifier.
+     *                 Select an object by either:
+     *                         One, and only one, of the numerical id or name of the workspace.
+     *                                 ws_id wsid - the numerical ID of the workspace.
+     *                                 ws_name workspace - the name of the workspace.
+     *                         AND
+     *                         One, and only one, of the numerical id or name of the object.
+     *                                 obj_id objid- the numerical ID of the object.
+     *                                 obj_name name - name of the object.
+     *                         OPTIONALLY
+     *                                 obj_ver ver - the version of the object.
+     *                 OR an object reference string:
+     *                         obj_ref ref - an object reference string.
+     * 
+ * + */ + @JsonProperty("from") + public ObjectIdentity getFrom() { + return from; + } + + /** + *

Original spec-file type: ObjectIdentity

+ *
+     * An object identifier.
+     *                 Select an object by either:
+     *                         One, and only one, of the numerical id or name of the workspace.
+     *                                 ws_id wsid - the numerical ID of the workspace.
+     *                                 ws_name workspace - the name of the workspace.
+     *                         AND
+     *                         One, and only one, of the numerical id or name of the object.
+     *                                 obj_id objid- the numerical ID of the object.
+     *                                 obj_name name - name of the object.
+     *                         OPTIONALLY
+     *                                 obj_ver ver - the version of the object.
+     *                 OR an object reference string:
+     *                         obj_ref ref - an object reference string.
+     * 
+ * + */ + @JsonProperty("from") + public void setFrom(ObjectIdentity from) { + this.from = from; + } + + public CopyObjectParams withFrom(ObjectIdentity from) { + this.from = from; + return this; + } + + /** + *

Original spec-file type: ObjectIdentity

+ *
+     * An object identifier.
+     *                 Select an object by either:
+     *                         One, and only one, of the numerical id or name of the workspace.
+     *                                 ws_id wsid - the numerical ID of the workspace.
+     *                                 ws_name workspace - the name of the workspace.
+     *                         AND
+     *                         One, and only one, of the numerical id or name of the object.
+     *                                 obj_id objid- the numerical ID of the object.
+     *                                 obj_name name - name of the object.
+     *                         OPTIONALLY
+     *                                 obj_ver ver - the version of the object.
+     *                 OR an object reference string:
+     *                         obj_ref ref - an object reference string.
+     * 
+ * + */ + @JsonProperty("to") + public ObjectIdentity getTo() { + return to; + } + + /** + *

Original spec-file type: ObjectIdentity

+ *
+     * An object identifier.
+     *                 Select an object by either:
+     *                         One, and only one, of the numerical id or name of the workspace.
+     *                                 ws_id wsid - the numerical ID of the workspace.
+     *                                 ws_name workspace - the name of the workspace.
+     *                         AND
+     *                         One, and only one, of the numerical id or name of the object.
+     *                                 obj_id objid- the numerical ID of the object.
+     *                                 obj_name name - name of the object.
+     *                         OPTIONALLY
+     *                                 obj_ver ver - the version of the object.
+     *                 OR an object reference string:
+     *                         obj_ref ref - an object reference string.
+     * 
+ * + */ + @JsonProperty("to") + public void setTo(ObjectIdentity to) { + this.to = to; + } + + public CopyObjectParams withTo(ObjectIdentity to) { + this.to = to; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + return ((((((("CopyObjectParams"+" [from=")+ from)+", to=")+ to)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/CreateWorkspaceParams.java b/service/src/main/java/us/kbase/workspace/CreateWorkspaceParams.java new file mode 100644 index 000000000..0639920bc --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/CreateWorkspaceParams.java @@ -0,0 +1,125 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: CreateWorkspaceParams

+ *
+ * Input parameters for the "create_workspace" function.
+ *                 Required arguments:
+ *                 ws_name workspace - name of the workspace to be created.
+ *                 Optional arguments:
+ *                 permission globalread - 'r' to set the new workspace globally readable,
+ *                         default 'n'.
+ *                 string description - A free-text description of the new workspace, 1000
+ *                         characters max. Longer strings will be mercilessly and brutally
+ *                         truncated.
+ *                 usermeta meta - arbitrary user-supplied metadata for the workspace.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "workspace", + "globalread", + "description", + "meta" +}) +public class CreateWorkspaceParams { + + @JsonProperty("workspace") + private java.lang.String workspace; + @JsonProperty("globalread") + private java.lang.String globalread; + @JsonProperty("description") + private java.lang.String description; + @JsonProperty("meta") + private Map meta; + private Map additionalProperties = new HashMap(); + + @JsonProperty("workspace") + public java.lang.String getWorkspace() { + return workspace; + } + + @JsonProperty("workspace") + public void setWorkspace(java.lang.String workspace) { + this.workspace = workspace; + } + + public CreateWorkspaceParams withWorkspace(java.lang.String workspace) { + this.workspace = workspace; + return this; + } + + @JsonProperty("globalread") + public java.lang.String getGlobalread() { + return globalread; + } + + @JsonProperty("globalread") + public void setGlobalread(java.lang.String globalread) { + this.globalread = globalread; + } + + public CreateWorkspaceParams withGlobalread(java.lang.String globalread) { + this.globalread = globalread; + return this; + } + + @JsonProperty("description") + public java.lang.String getDescription() { + return description; + } + + @JsonProperty("description") + public void setDescription(java.lang.String description) { + this.description = description; + } + + public CreateWorkspaceParams withDescription(java.lang.String description) { + this.description = description; + return this; + } + + @JsonProperty("meta") + public Map getMeta() { + return meta; + } + + @JsonProperty("meta") + public void setMeta(Map meta) { + this.meta = meta; + } + + public CreateWorkspaceParams withMeta(Map meta) { + this.meta = meta; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(java.lang.String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public java.lang.String toString() { + return ((((((((((("CreateWorkspaceParams"+" [workspace=")+ workspace)+", globalread=")+ globalread)+", description=")+ description)+", meta=")+ meta)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/ExternalDataUnit.java b/service/src/main/java/us/kbase/workspace/ExternalDataUnit.java new file mode 100644 index 000000000..179733cb1 --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/ExternalDataUnit.java @@ -0,0 +1,204 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: ExternalDataUnit

+ *
+ * An external data unit. A piece of data from a source outside the
+ * Workspace.
+ * On input, only one of the resource_release_date or
+ * resource_release_epoch may be supplied. Both are supplied on output.
+ * All fields are optional, but at least one field must be present.
+ * string resource_name - the name of the resource, for example JGI.
+ * string resource_url - the url of the resource, for example
+ *         http://genome.jgi.doe.gov
+ * string resource_version - version of the resource
+ * timestamp resource_release_date - the release date of the resource
+ * epoch resource_release_epoch - the release date of the resource
+ * string data_url - the url of the data, for example
+ *         http://genome.jgi.doe.gov/pages/dynamicOrganismDownload.jsf?
+ *                 organism=BlaspURHD0036
+ * string data_id - the id of the data, for example
+ *         7625.2.79179.AGTTCC.adnq.fastq.gz
+ * string description - a free text description of the data.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "resource_name", + "resource_url", + "resource_version", + "resource_release_date", + "resource_release_epoch", + "data_url", + "data_id", + "description" +}) +public class ExternalDataUnit { + + @JsonProperty("resource_name") + private String resourceName; + @JsonProperty("resource_url") + private String resourceUrl; + @JsonProperty("resource_version") + private String resourceVersion; + @JsonProperty("resource_release_date") + private String resourceReleaseDate; + @JsonProperty("resource_release_epoch") + private Long resourceReleaseEpoch; + @JsonProperty("data_url") + private String dataUrl; + @JsonProperty("data_id") + private String dataId; + @JsonProperty("description") + private String description; + private Map additionalProperties = new HashMap(); + + @JsonProperty("resource_name") + public String getResourceName() { + return resourceName; + } + + @JsonProperty("resource_name") + public void setResourceName(String resourceName) { + this.resourceName = resourceName; + } + + public ExternalDataUnit withResourceName(String resourceName) { + this.resourceName = resourceName; + return this; + } + + @JsonProperty("resource_url") + public String getResourceUrl() { + return resourceUrl; + } + + @JsonProperty("resource_url") + public void setResourceUrl(String resourceUrl) { + this.resourceUrl = resourceUrl; + } + + public ExternalDataUnit withResourceUrl(String resourceUrl) { + this.resourceUrl = resourceUrl; + return this; + } + + @JsonProperty("resource_version") + public String getResourceVersion() { + return resourceVersion; + } + + @JsonProperty("resource_version") + public void setResourceVersion(String resourceVersion) { + this.resourceVersion = resourceVersion; + } + + public ExternalDataUnit withResourceVersion(String resourceVersion) { + this.resourceVersion = resourceVersion; + return this; + } + + @JsonProperty("resource_release_date") + public String getResourceReleaseDate() { + return resourceReleaseDate; + } + + @JsonProperty("resource_release_date") + public void setResourceReleaseDate(String resourceReleaseDate) { + this.resourceReleaseDate = resourceReleaseDate; + } + + public ExternalDataUnit withResourceReleaseDate(String resourceReleaseDate) { + this.resourceReleaseDate = resourceReleaseDate; + return this; + } + + @JsonProperty("resource_release_epoch") + public Long getResourceReleaseEpoch() { + return resourceReleaseEpoch; + } + + @JsonProperty("resource_release_epoch") + public void setResourceReleaseEpoch(Long resourceReleaseEpoch) { + this.resourceReleaseEpoch = resourceReleaseEpoch; + } + + public ExternalDataUnit withResourceReleaseEpoch(Long resourceReleaseEpoch) { + this.resourceReleaseEpoch = resourceReleaseEpoch; + return this; + } + + @JsonProperty("data_url") + public String getDataUrl() { + return dataUrl; + } + + @JsonProperty("data_url") + public void setDataUrl(String dataUrl) { + this.dataUrl = dataUrl; + } + + public ExternalDataUnit withDataUrl(String dataUrl) { + this.dataUrl = dataUrl; + return this; + } + + @JsonProperty("data_id") + public String getDataId() { + return dataId; + } + + @JsonProperty("data_id") + public void setDataId(String dataId) { + this.dataId = dataId; + } + + public ExternalDataUnit withDataId(String dataId) { + this.dataId = dataId; + return this; + } + + @JsonProperty("description") + public String getDescription() { + return description; + } + + @JsonProperty("description") + public void setDescription(String description) { + this.description = description; + } + + public ExternalDataUnit withDescription(String description) { + this.description = description; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + return ((((((((((((((((((("ExternalDataUnit"+" [resourceName=")+ resourceName)+", resourceUrl=")+ resourceUrl)+", resourceVersion=")+ resourceVersion)+", resourceReleaseDate=")+ resourceReleaseDate)+", resourceReleaseEpoch=")+ resourceReleaseEpoch)+", dataUrl=")+ dataUrl)+", dataId=")+ dataId)+", description=")+ description)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/FuncInfo.java b/service/src/main/java/us/kbase/workspace/FuncInfo.java new file mode 100644 index 000000000..84058009b --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/FuncInfo.java @@ -0,0 +1,208 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: FuncInfo

+ *
+ * DEPRECATED
+ * @deprecated
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "func_def", + "description", + "spec_def", + "parsing_structure", + "module_vers", + "released_module_vers", + "func_vers", + "released_func_vers", + "used_type_defs" +}) +public class FuncInfo { + + @JsonProperty("func_def") + private java.lang.String funcDef; + @JsonProperty("description") + private java.lang.String description; + @JsonProperty("spec_def") + private java.lang.String specDef; + @JsonProperty("parsing_structure") + private java.lang.String parsingStructure; + @JsonProperty("module_vers") + private List moduleVers; + @JsonProperty("released_module_vers") + private List releasedModuleVers; + @JsonProperty("func_vers") + private List funcVers; + @JsonProperty("released_func_vers") + private List releasedFuncVers; + @JsonProperty("used_type_defs") + private List usedTypeDefs; + private Map additionalProperties = new HashMap(); + + @JsonProperty("func_def") + public java.lang.String getFuncDef() { + return funcDef; + } + + @JsonProperty("func_def") + public void setFuncDef(java.lang.String funcDef) { + this.funcDef = funcDef; + } + + public FuncInfo withFuncDef(java.lang.String funcDef) { + this.funcDef = funcDef; + return this; + } + + @JsonProperty("description") + public java.lang.String getDescription() { + return description; + } + + @JsonProperty("description") + public void setDescription(java.lang.String description) { + this.description = description; + } + + public FuncInfo withDescription(java.lang.String description) { + this.description = description; + return this; + } + + @JsonProperty("spec_def") + public java.lang.String getSpecDef() { + return specDef; + } + + @JsonProperty("spec_def") + public void setSpecDef(java.lang.String specDef) { + this.specDef = specDef; + } + + public FuncInfo withSpecDef(java.lang.String specDef) { + this.specDef = specDef; + return this; + } + + @JsonProperty("parsing_structure") + public java.lang.String getParsingStructure() { + return parsingStructure; + } + + @JsonProperty("parsing_structure") + public void setParsingStructure(java.lang.String parsingStructure) { + this.parsingStructure = parsingStructure; + } + + public FuncInfo withParsingStructure(java.lang.String parsingStructure) { + this.parsingStructure = parsingStructure; + return this; + } + + @JsonProperty("module_vers") + public List getModuleVers() { + return moduleVers; + } + + @JsonProperty("module_vers") + public void setModuleVers(List moduleVers) { + this.moduleVers = moduleVers; + } + + public FuncInfo withModuleVers(List moduleVers) { + this.moduleVers = moduleVers; + return this; + } + + @JsonProperty("released_module_vers") + public List getReleasedModuleVers() { + return releasedModuleVers; + } + + @JsonProperty("released_module_vers") + public void setReleasedModuleVers(List releasedModuleVers) { + this.releasedModuleVers = releasedModuleVers; + } + + public FuncInfo withReleasedModuleVers(List releasedModuleVers) { + this.releasedModuleVers = releasedModuleVers; + return this; + } + + @JsonProperty("func_vers") + public List getFuncVers() { + return funcVers; + } + + @JsonProperty("func_vers") + public void setFuncVers(List funcVers) { + this.funcVers = funcVers; + } + + public FuncInfo withFuncVers(List funcVers) { + this.funcVers = funcVers; + return this; + } + + @JsonProperty("released_func_vers") + public List getReleasedFuncVers() { + return releasedFuncVers; + } + + @JsonProperty("released_func_vers") + public void setReleasedFuncVers(List releasedFuncVers) { + this.releasedFuncVers = releasedFuncVers; + } + + public FuncInfo withReleasedFuncVers(List releasedFuncVers) { + this.releasedFuncVers = releasedFuncVers; + return this; + } + + @JsonProperty("used_type_defs") + public List getUsedTypeDefs() { + return usedTypeDefs; + } + + @JsonProperty("used_type_defs") + public void setUsedTypeDefs(List usedTypeDefs) { + this.usedTypeDefs = usedTypeDefs; + } + + public FuncInfo withUsedTypeDefs(List usedTypeDefs) { + this.usedTypeDefs = usedTypeDefs; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(java.lang.String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public java.lang.String toString() { + return ((((((((((((((((((((("FuncInfo"+" [funcDef=")+ funcDef)+", description=")+ description)+", specDef=")+ specDef)+", parsingStructure=")+ parsingStructure)+", moduleVers=")+ moduleVers)+", releasedModuleVers=")+ releasedModuleVers)+", funcVers=")+ funcVers)+", releasedFuncVers=")+ releasedFuncVers)+", usedTypeDefs=")+ usedTypeDefs)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/GetAdminRoleResults.java b/service/src/main/java/us/kbase/workspace/GetAdminRoleResults.java new file mode 100644 index 000000000..24f4f5d55 --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/GetAdminRoleResults.java @@ -0,0 +1,63 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: GetAdminRoleResults

+ *
+ * The results of the get_admin_role call.
+ *         adminrole - the users's administration role, one of `none`, `read`, or `full`.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "adminrole" +}) +public class GetAdminRoleResults { + + @JsonProperty("adminrole") + private String adminrole; + private Map additionalProperties = new HashMap(); + + @JsonProperty("adminrole") + public String getAdminrole() { + return adminrole; + } + + @JsonProperty("adminrole") + public void setAdminrole(String adminrole) { + this.adminrole = adminrole; + } + + public GetAdminRoleResults withAdminrole(String adminrole) { + this.adminrole = adminrole; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + return ((((("GetAdminRoleResults"+" [adminrole=")+ adminrole)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/GetModuleInfoParams.java b/service/src/main/java/us/kbase/workspace/GetModuleInfoParams.java new file mode 100644 index 000000000..45c8c1ff7 --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/GetModuleInfoParams.java @@ -0,0 +1,85 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: GetModuleInfoParams

+ *
+ * Parameters for the get_module_info function.
+ *                 Required arguments:
+ *                 modulename mod - the name of the module to retrieve.
+ *                 Optional arguments:
+ *                 spec_version ver - the version of the module to retrieve. Defaults to
+ *                         the latest version.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "mod", + "ver" +}) +public class GetModuleInfoParams { + + @JsonProperty("mod") + private String mod; + @JsonProperty("ver") + private Long ver; + private Map additionalProperties = new HashMap(); + + @JsonProperty("mod") + public String getMod() { + return mod; + } + + @JsonProperty("mod") + public void setMod(String mod) { + this.mod = mod; + } + + public GetModuleInfoParams withMod(String mod) { + this.mod = mod; + return this; + } + + @JsonProperty("ver") + public Long getVer() { + return ver; + } + + @JsonProperty("ver") + public void setVer(Long ver) { + this.ver = ver; + } + + public GetModuleInfoParams withVer(Long ver) { + this.ver = ver; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + return ((((((("GetModuleInfoParams"+" [mod=")+ mod)+", ver=")+ ver)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/GetNamesByPrefixParams.java b/service/src/main/java/us/kbase/workspace/GetNamesByPrefixParams.java new file mode 100644 index 000000000..b5bc8c289 --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/GetNamesByPrefixParams.java @@ -0,0 +1,105 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: GetNamesByPrefixParams

+ *
+ * Input parameters for the get_names_by_prefix function.
+ *                 Required arguments:
+ *                 list workspaces - the workspaces to search.
+ *                 string prefix - the prefix of the object names to return.
+ *                 Optional arguments:
+ *                 boolean includeHidden - include names of hidden objects in the results.
+ *                         Default false.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "workspaces", + "prefix", + "includeHidden" +}) +public class GetNamesByPrefixParams { + + @JsonProperty("workspaces") + private List workspaces; + @JsonProperty("prefix") + private String prefix; + @JsonProperty("includeHidden") + private Long includeHidden; + private Map additionalProperties = new HashMap(); + + @JsonProperty("workspaces") + public List getWorkspaces() { + return workspaces; + } + + @JsonProperty("workspaces") + public void setWorkspaces(List workspaces) { + this.workspaces = workspaces; + } + + public GetNamesByPrefixParams withWorkspaces(List workspaces) { + this.workspaces = workspaces; + return this; + } + + @JsonProperty("prefix") + public String getPrefix() { + return prefix; + } + + @JsonProperty("prefix") + public void setPrefix(String prefix) { + this.prefix = prefix; + } + + public GetNamesByPrefixParams withPrefix(String prefix) { + this.prefix = prefix; + return this; + } + + @JsonProperty("includeHidden") + public Long getIncludeHidden() { + return includeHidden; + } + + @JsonProperty("includeHidden") + public void setIncludeHidden(Long includeHidden) { + this.includeHidden = includeHidden; + } + + public GetNamesByPrefixParams withIncludeHidden(Long includeHidden) { + this.includeHidden = includeHidden; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + return ((((((((("GetNamesByPrefixParams"+" [workspaces=")+ workspaces)+", prefix=")+ prefix)+", includeHidden=")+ includeHidden)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/GetNamesByPrefixResults.java b/service/src/main/java/us/kbase/workspace/GetNamesByPrefixResults.java new file mode 100644 index 000000000..a4421eb9b --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/GetNamesByPrefixResults.java @@ -0,0 +1,65 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: GetNamesByPrefixResults

+ *
+ * Results object for the get_names_by_prefix function.
+ *                 list> names - the names matching the provided prefix,
+ *                         listed in order of the input workspaces.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "names" +}) +public class GetNamesByPrefixResults { + + @JsonProperty("names") + private List> names; + private Map additionalProperties = new HashMap(); + + @JsonProperty("names") + public List> getNames() { + return names; + } + + @JsonProperty("names") + public void setNames(List> names) { + this.names = names; + } + + public GetNamesByPrefixResults withNames(List> names) { + this.names = names; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(java.lang.String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public java.lang.String toString() { + return ((((("GetNamesByPrefixResults"+" [names=")+ names)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/GetObjectInfo3Params.java b/service/src/main/java/us/kbase/workspace/GetObjectInfo3Params.java new file mode 100644 index 000000000..e1704a5da --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/GetObjectInfo3Params.java @@ -0,0 +1,129 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: GetObjectInfo3Params

+ *
+ * Input parameters for the "get_object_info3" function.
+ *                 Required arguments:
+ *                 list objects - the objects for which the
+ *                         information should be fetched. Subsetting related parameters are
+ *                         ignored.
+ *                 Optional arguments:
+ *                 boolean infostruct - return information about the object as a structure rather than a tuple.
+ *                         Default false. If true, infos and paths will be null.
+ *                 boolean includeMetadata - include the user and admin metadata in the returned
+ *                         information. Default false.
+ *                 boolean ignoreErrors - Don't throw an exception if an object cannot
+ *                         be accessed; return null for that object's information and path instead.
+ *                         Default false.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "objects", + "infostruct", + "includeMetadata", + "ignoreErrors" +}) +public class GetObjectInfo3Params { + + @JsonProperty("objects") + private List objects; + @JsonProperty("infostruct") + private Long infostruct; + @JsonProperty("includeMetadata") + private Long includeMetadata; + @JsonProperty("ignoreErrors") + private Long ignoreErrors; + private Map additionalProperties = new HashMap(); + + @JsonProperty("objects") + public List getObjects() { + return objects; + } + + @JsonProperty("objects") + public void setObjects(List objects) { + this.objects = objects; + } + + public GetObjectInfo3Params withObjects(List objects) { + this.objects = objects; + return this; + } + + @JsonProperty("infostruct") + public Long getInfostruct() { + return infostruct; + } + + @JsonProperty("infostruct") + public void setInfostruct(Long infostruct) { + this.infostruct = infostruct; + } + + public GetObjectInfo3Params withInfostruct(Long infostruct) { + this.infostruct = infostruct; + return this; + } + + @JsonProperty("includeMetadata") + public Long getIncludeMetadata() { + return includeMetadata; + } + + @JsonProperty("includeMetadata") + public void setIncludeMetadata(Long includeMetadata) { + this.includeMetadata = includeMetadata; + } + + public GetObjectInfo3Params withIncludeMetadata(Long includeMetadata) { + this.includeMetadata = includeMetadata; + return this; + } + + @JsonProperty("ignoreErrors") + public Long getIgnoreErrors() { + return ignoreErrors; + } + + @JsonProperty("ignoreErrors") + public void setIgnoreErrors(Long ignoreErrors) { + this.ignoreErrors = ignoreErrors; + } + + public GetObjectInfo3Params withIgnoreErrors(Long ignoreErrors) { + this.ignoreErrors = ignoreErrors; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + return ((((((((((("GetObjectInfo3Params"+" [objects=")+ objects)+", infostruct=")+ infostruct)+", includeMetadata=")+ includeMetadata)+", ignoreErrors=")+ ignoreErrors)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/GetObjectInfo3Results.java b/service/src/main/java/us/kbase/workspace/GetObjectInfo3Results.java new file mode 100644 index 000000000..2e652ecb3 --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/GetObjectInfo3Results.java @@ -0,0 +1,104 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import us.kbase.common.service.Tuple11; + + +/** + *

Original spec-file type: GetObjectInfo3Results

+ *
+ * Output from the get_object_info3 function.
+ *                 list infos - the object_info data for each object.
+ *                 list paths - the path to the object through the object reference graph for
+ *                         each object. All the references in the path are absolute.
+ *                 list infostructs - the ObjectInfo data for each object.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "infos", + "paths", + "infostructs" +}) +public class GetObjectInfo3Results { + + @JsonProperty("infos") + private List>> infos; + @JsonProperty("paths") + private List> paths; + @JsonProperty("infostructs") + private List infostructs; + private Map additionalProperties = new HashMap(); + + @JsonProperty("infos") + public List>> getInfos() { + return infos; + } + + @JsonProperty("infos") + public void setInfos(List>> infos) { + this.infos = infos; + } + + public GetObjectInfo3Results withInfos(List>> infos) { + this.infos = infos; + return this; + } + + @JsonProperty("paths") + public List> getPaths() { + return paths; + } + + @JsonProperty("paths") + public void setPaths(List> paths) { + this.paths = paths; + } + + public GetObjectInfo3Results withPaths(List> paths) { + this.paths = paths; + return this; + } + + @JsonProperty("infostructs") + public List getInfostructs() { + return infostructs; + } + + @JsonProperty("infostructs") + public void setInfostructs(List infostructs) { + this.infostructs = infostructs; + } + + public GetObjectInfo3Results withInfostructs(List infostructs) { + this.infostructs = infostructs; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(java.lang.String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public java.lang.String toString() { + return ((((((((("GetObjectInfo3Results"+" [infos=")+ infos)+", paths=")+ paths)+", infostructs=")+ infostructs)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/GetObjectInfoNewParams.java b/service/src/main/java/us/kbase/workspace/GetObjectInfoNewParams.java new file mode 100644 index 000000000..fe1d8974e --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/GetObjectInfoNewParams.java @@ -0,0 +1,110 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: GetObjectInfoNewParams

+ *
+ * Input parameters for the "get_object_info_new" function.
+ *                 Required arguments:
+ *                 list objects - the objects for which the
+ *                         information should be fetched. Subsetting related parameters are
+ *                         ignored.
+ *                 Optional arguments:
+ *                 boolean includeMetadata - include the object metadata in the returned
+ *                         information. Default false.
+ *                 boolean ignoreErrors - Don't throw an exception if an object cannot
+ *                         be accessed; return null for that object's information instead.
+ *                         Default false.
+ *                 @deprecated Workspace.GetObjectInfo3Params
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "objects", + "includeMetadata", + "ignoreErrors" +}) +public class GetObjectInfoNewParams { + + @JsonProperty("objects") + private List objects; + @JsonProperty("includeMetadata") + private Long includeMetadata; + @JsonProperty("ignoreErrors") + private Long ignoreErrors; + private Map additionalProperties = new HashMap(); + + @JsonProperty("objects") + public List getObjects() { + return objects; + } + + @JsonProperty("objects") + public void setObjects(List objects) { + this.objects = objects; + } + + public GetObjectInfoNewParams withObjects(List objects) { + this.objects = objects; + return this; + } + + @JsonProperty("includeMetadata") + public Long getIncludeMetadata() { + return includeMetadata; + } + + @JsonProperty("includeMetadata") + public void setIncludeMetadata(Long includeMetadata) { + this.includeMetadata = includeMetadata; + } + + public GetObjectInfoNewParams withIncludeMetadata(Long includeMetadata) { + this.includeMetadata = includeMetadata; + return this; + } + + @JsonProperty("ignoreErrors") + public Long getIgnoreErrors() { + return ignoreErrors; + } + + @JsonProperty("ignoreErrors") + public void setIgnoreErrors(Long ignoreErrors) { + this.ignoreErrors = ignoreErrors; + } + + public GetObjectInfoNewParams withIgnoreErrors(Long ignoreErrors) { + this.ignoreErrors = ignoreErrors; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + return ((((((((("GetObjectInfoNewParams"+" [objects=")+ objects)+", includeMetadata=")+ includeMetadata)+", ignoreErrors=")+ ignoreErrors)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/GetObjectOutput.java b/service/src/main/java/us/kbase/workspace/GetObjectOutput.java new file mode 100644 index 000000000..06f5a0324 --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/GetObjectOutput.java @@ -0,0 +1,86 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import us.kbase.common.service.Tuple12; +import us.kbase.common.service.UObject; + + +/** + *

Original spec-file type: get_object_output

+ *
+ * Output generated by the "get_object" function. Provided for backwards
+ * compatibility.
+ * UnspecifiedObject data - The object's data.
+ * object_metadata metadata - Metadata for object retrieved/
+ * @deprecated Workspace.ObjectData
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "data", + "metadata" +}) +public class GetObjectOutput { + + @JsonProperty("data") + private UObject data; + @JsonProperty("metadata") + private Tuple12 , Long> metadata; + private Map additionalProperties = new HashMap(); + + @JsonProperty("data") + public UObject getData() { + return data; + } + + @JsonProperty("data") + public void setData(UObject data) { + this.data = data; + } + + public GetObjectOutput withData(UObject data) { + this.data = data; + return this; + } + + @JsonProperty("metadata") + public Tuple12 , Long> getMetadata() { + return metadata; + } + + @JsonProperty("metadata") + public void setMetadata(Tuple12 , Long> metadata) { + this.metadata = metadata; + } + + public GetObjectOutput withMetadata(Tuple12 , Long> metadata) { + this.metadata = metadata; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(java.lang.String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public java.lang.String toString() { + return ((((((("GetObjectOutput"+" [data=")+ data)+", metadata=")+ metadata)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/GetObjectParams.java b/service/src/main/java/us/kbase/workspace/GetObjectParams.java new file mode 100644 index 000000000..3e9133d24 --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/GetObjectParams.java @@ -0,0 +1,128 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: get_object_params

+ *
+ * Input parameters for the "get_object" function. Provided for backwards
+ * compatibility.
+ * Required arguments:
+ * ws_name workspace - Name of the workspace containing the object to be
+ *         retrieved
+ * obj_name id - Name of the object to be retrieved
+ * Optional arguments:
+ * int instance - Version of the object to be retrieved, enabling
+ *         retrieval of any previous version of an object
+ * string auth - the authentication token of the KBase account accessing
+ *         the object. Overrides the client provided authorization
+ *         credentials if they exist.
+ * @deprecated Workspace.ObjectIdentity
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "id", + "workspace", + "instance", + "auth" +}) +public class GetObjectParams { + + @JsonProperty("id") + private String id; + @JsonProperty("workspace") + private String workspace; + @JsonProperty("instance") + private Long instance; + @JsonProperty("auth") + private String auth; + private Map additionalProperties = new HashMap(); + + @JsonProperty("id") + public String getId() { + return id; + } + + @JsonProperty("id") + public void setId(String id) { + this.id = id; + } + + public GetObjectParams withId(String id) { + this.id = id; + return this; + } + + @JsonProperty("workspace") + public String getWorkspace() { + return workspace; + } + + @JsonProperty("workspace") + public void setWorkspace(String workspace) { + this.workspace = workspace; + } + + public GetObjectParams withWorkspace(String workspace) { + this.workspace = workspace; + return this; + } + + @JsonProperty("instance") + public Long getInstance() { + return instance; + } + + @JsonProperty("instance") + public void setInstance(Long instance) { + this.instance = instance; + } + + public GetObjectParams withInstance(Long instance) { + this.instance = instance; + return this; + } + + @JsonProperty("auth") + public String getAuth() { + return auth; + } + + @JsonProperty("auth") + public void setAuth(String auth) { + this.auth = auth; + } + + public GetObjectParams withAuth(String auth) { + this.auth = auth; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + return ((((((((((("GetObjectParams"+" [id=")+ id)+", workspace=")+ workspace)+", instance=")+ instance)+", auth=")+ auth)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/GetObjectmetaParams.java b/service/src/main/java/us/kbase/workspace/GetObjectmetaParams.java new file mode 100644 index 000000000..e4fb49a52 --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/GetObjectmetaParams.java @@ -0,0 +1,127 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: get_objectmeta_params

+ *
+ * Input parameters for the "get_objectmeta" function.
+ *                 Required arguments:
+ *                 ws_name workspace - name of the workspace containing the object for
+ *                          which metadata is to be retrieved
+ *                 obj_name id - name of the object for which metadata is to be retrieved
+ *                 Optional arguments:
+ *                 int instance - Version of the object for which metadata is to be
+ *                          retrieved, enabling retrieval of any previous version of an object
+ *                 string auth - the authentication token of the KBase account requesting
+ *                         access. Overrides the client provided authorization credentials if
+ *                         they exist.
+ *                 @deprecated Workspace.ObjectIdentity
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "id", + "workspace", + "instance", + "auth" +}) +public class GetObjectmetaParams { + + @JsonProperty("id") + private String id; + @JsonProperty("workspace") + private String workspace; + @JsonProperty("instance") + private Long instance; + @JsonProperty("auth") + private String auth; + private Map additionalProperties = new HashMap(); + + @JsonProperty("id") + public String getId() { + return id; + } + + @JsonProperty("id") + public void setId(String id) { + this.id = id; + } + + public GetObjectmetaParams withId(String id) { + this.id = id; + return this; + } + + @JsonProperty("workspace") + public String getWorkspace() { + return workspace; + } + + @JsonProperty("workspace") + public void setWorkspace(String workspace) { + this.workspace = workspace; + } + + public GetObjectmetaParams withWorkspace(String workspace) { + this.workspace = workspace; + return this; + } + + @JsonProperty("instance") + public Long getInstance() { + return instance; + } + + @JsonProperty("instance") + public void setInstance(Long instance) { + this.instance = instance; + } + + public GetObjectmetaParams withInstance(Long instance) { + this.instance = instance; + return this; + } + + @JsonProperty("auth") + public String getAuth() { + return auth; + } + + @JsonProperty("auth") + public void setAuth(String auth) { + this.auth = auth; + } + + public GetObjectmetaParams withAuth(String auth) { + this.auth = auth; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + return ((((((((((("GetObjectmetaParams"+" [id=")+ id)+", workspace=")+ workspace)+", instance=")+ instance)+", auth=")+ auth)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/GetObjects2Params.java b/service/src/main/java/us/kbase/workspace/GetObjects2Params.java new file mode 100644 index 000000000..2084f8f2c --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/GetObjects2Params.java @@ -0,0 +1,176 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: GetObjects2Params

+ *
+ * Input parameters for the get_objects2 function.
+ *                 Required parameters:
+ *                 list objects - the list of object specifications
+ *                         for the objects to return (via reference chain and as a subset if
+ *                         specified).
+ *                 Optional parameters:
+ *                 boolean ignoreErrors - Don't throw an exception if an object cannot
+ *                         be accessed; return null for that object's information instead.
+ *                         Default false.
+ *                 boolean infostruct - return the object information as a structure rather than a tuple.
+ *                         Default false. If true, ObjectData.path will be null as it is provided in
+ *                         the ObjectInfo data.
+ *                 boolean no_data - return the provenance, references, and
+ *                         object_info for this object without the object data. Default false.
+ *                 boolean skip_external_system_updates - if the objects contain any external IDs, don't
+ *                         contact external systems to perform any updates for those IDs (often ACL updates,
+ *                         e.g. for handle / blobstore / sample IDs). In some cases this can speed up fetching the
+ *                         data. Default false.
+ *                 boolean batch_external_system_updates - if the objects contain any external IDs,
+ *                         send all external system updates in a batch to each external system when possible
+ *                         rather than object by object. This can potentially speed up the updates, but the
+ *                         drawback is that if the external update fails for any object, all the objects that
+ *                         required updates for that system will be marked as having a failed update.
+ *                         Has no effect if skip_external_system_updates is true. Default false.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "objects", + "ignoreErrors", + "infostruct", + "no_data", + "skip_external_system_updates", + "batch_external_system_updates" +}) +public class GetObjects2Params { + + @JsonProperty("objects") + private List objects; + @JsonProperty("ignoreErrors") + private Long ignoreErrors; + @JsonProperty("infostruct") + private Long infostruct; + @JsonProperty("no_data") + private Long noData; + @JsonProperty("skip_external_system_updates") + private Long skipExternalSystemUpdates; + @JsonProperty("batch_external_system_updates") + private Long batchExternalSystemUpdates; + private Map additionalProperties = new HashMap(); + + @JsonProperty("objects") + public List getObjects() { + return objects; + } + + @JsonProperty("objects") + public void setObjects(List objects) { + this.objects = objects; + } + + public GetObjects2Params withObjects(List objects) { + this.objects = objects; + return this; + } + + @JsonProperty("ignoreErrors") + public Long getIgnoreErrors() { + return ignoreErrors; + } + + @JsonProperty("ignoreErrors") + public void setIgnoreErrors(Long ignoreErrors) { + this.ignoreErrors = ignoreErrors; + } + + public GetObjects2Params withIgnoreErrors(Long ignoreErrors) { + this.ignoreErrors = ignoreErrors; + return this; + } + + @JsonProperty("infostruct") + public Long getInfostruct() { + return infostruct; + } + + @JsonProperty("infostruct") + public void setInfostruct(Long infostruct) { + this.infostruct = infostruct; + } + + public GetObjects2Params withInfostruct(Long infostruct) { + this.infostruct = infostruct; + return this; + } + + @JsonProperty("no_data") + public Long getNoData() { + return noData; + } + + @JsonProperty("no_data") + public void setNoData(Long noData) { + this.noData = noData; + } + + public GetObjects2Params withNoData(Long noData) { + this.noData = noData; + return this; + } + + @JsonProperty("skip_external_system_updates") + public Long getSkipExternalSystemUpdates() { + return skipExternalSystemUpdates; + } + + @JsonProperty("skip_external_system_updates") + public void setSkipExternalSystemUpdates(Long skipExternalSystemUpdates) { + this.skipExternalSystemUpdates = skipExternalSystemUpdates; + } + + public GetObjects2Params withSkipExternalSystemUpdates(Long skipExternalSystemUpdates) { + this.skipExternalSystemUpdates = skipExternalSystemUpdates; + return this; + } + + @JsonProperty("batch_external_system_updates") + public Long getBatchExternalSystemUpdates() { + return batchExternalSystemUpdates; + } + + @JsonProperty("batch_external_system_updates") + public void setBatchExternalSystemUpdates(Long batchExternalSystemUpdates) { + this.batchExternalSystemUpdates = batchExternalSystemUpdates; + } + + public GetObjects2Params withBatchExternalSystemUpdates(Long batchExternalSystemUpdates) { + this.batchExternalSystemUpdates = batchExternalSystemUpdates; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + return ((((((((((((((("GetObjects2Params"+" [objects=")+ objects)+", ignoreErrors=")+ ignoreErrors)+", infostruct=")+ infostruct)+", noData=")+ noData)+", skipExternalSystemUpdates=")+ skipExternalSystemUpdates)+", batchExternalSystemUpdates=")+ batchExternalSystemUpdates)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/GetObjects2Results.java b/service/src/main/java/us/kbase/workspace/GetObjects2Results.java new file mode 100644 index 000000000..5fd0d872b --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/GetObjects2Results.java @@ -0,0 +1,64 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: GetObjects2Results

+ *
+ * Results from the get_objects2 function.
+ *                 list data - the returned objects.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "data" +}) +public class GetObjects2Results { + + @JsonProperty("data") + private List data; + private Map additionalProperties = new HashMap(); + + @JsonProperty("data") + public List getData() { + return data; + } + + @JsonProperty("data") + public void setData(List data) { + this.data = data; + } + + public GetObjects2Results withData(List data) { + this.data = data; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + return ((((("GetObjects2Results"+" [data=")+ data)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/GetPermissionsMassParams.java b/service/src/main/java/us/kbase/workspace/GetPermissionsMassParams.java new file mode 100644 index 000000000..15dbc764c --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/GetPermissionsMassParams.java @@ -0,0 +1,65 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: GetPermissionsMassParams

+ *
+ * Input parameters for the "get_permissions_mass" function.
+ * workspaces - the workspaces for which to return the permissions,
+ *         maximum 1000.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "workspaces" +}) +public class GetPermissionsMassParams { + + @JsonProperty("workspaces") + private List workspaces; + private Map additionalProperties = new HashMap(); + + @JsonProperty("workspaces") + public List getWorkspaces() { + return workspaces; + } + + @JsonProperty("workspaces") + public void setWorkspaces(List workspaces) { + this.workspaces = workspaces; + } + + public GetPermissionsMassParams withWorkspaces(List workspaces) { + this.workspaces = workspaces; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + return ((((("GetPermissionsMassParams"+" [workspaces=")+ workspaces)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/GetWorkspacemetaParams.java b/service/src/main/java/us/kbase/workspace/GetWorkspacemetaParams.java new file mode 100644 index 000000000..91444e257 --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/GetWorkspacemetaParams.java @@ -0,0 +1,108 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: get_workspacemeta_params

+ *
+ * DEPRECATED
+ *                 Input parameters for the "get_workspacemeta" function. Provided for
+ *                 backwards compatibility.
+ *                 One, and only one of:
+ *                 ws_name workspace - name of the workspace.
+ *                 ws_id id - the numerical ID of the workspace.
+ *                 Optional arguments:
+ *                 string auth - the authentication token of the KBase account accessing
+ *                         the workspace. Overrides the client provided authorization
+ *                         credentials if they exist.
+ *                 @deprecated Workspace.WorkspaceIdentity
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "workspace", + "id", + "auth" +}) +public class GetWorkspacemetaParams { + + @JsonProperty("workspace") + private String workspace; + @JsonProperty("id") + private Long id; + @JsonProperty("auth") + private String auth; + private Map additionalProperties = new HashMap(); + + @JsonProperty("workspace") + public String getWorkspace() { + return workspace; + } + + @JsonProperty("workspace") + public void setWorkspace(String workspace) { + this.workspace = workspace; + } + + public GetWorkspacemetaParams withWorkspace(String workspace) { + this.workspace = workspace; + return this; + } + + @JsonProperty("id") + public Long getId() { + return id; + } + + @JsonProperty("id") + public void setId(Long id) { + this.id = id; + } + + public GetWorkspacemetaParams withId(Long id) { + this.id = id; + return this; + } + + @JsonProperty("auth") + public String getAuth() { + return auth; + } + + @JsonProperty("auth") + public void setAuth(String auth) { + this.auth = auth; + } + + public GetWorkspacemetaParams withAuth(String auth) { + this.auth = auth; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + return ((((((((("GetWorkspacemetaParams"+" [workspace=")+ workspace)+", id=")+ id)+", auth=")+ auth)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/GrantModuleOwnershipParams.java b/service/src/main/java/us/kbase/workspace/GrantModuleOwnershipParams.java new file mode 100644 index 000000000..8c441d0d0 --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/GrantModuleOwnershipParams.java @@ -0,0 +1,105 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: GrantModuleOwnershipParams

+ *
+ * Parameters for the grant_module_ownership function.
+ *                 Required arguments:
+ *                 modulename mod - the module to modify.
+ *                 username new_owner - the user to add to the module's list of
+ *                         owners.
+ *                 Optional arguments:
+ *                 boolean with_grant_option - true to allow the user to add owners
+ *                         to the module.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "mod", + "new_owner", + "with_grant_option" +}) +public class GrantModuleOwnershipParams { + + @JsonProperty("mod") + private String mod; + @JsonProperty("new_owner") + private String newOwner; + @JsonProperty("with_grant_option") + private Long withGrantOption; + private Map additionalProperties = new HashMap(); + + @JsonProperty("mod") + public String getMod() { + return mod; + } + + @JsonProperty("mod") + public void setMod(String mod) { + this.mod = mod; + } + + public GrantModuleOwnershipParams withMod(String mod) { + this.mod = mod; + return this; + } + + @JsonProperty("new_owner") + public String getNewOwner() { + return newOwner; + } + + @JsonProperty("new_owner") + public void setNewOwner(String newOwner) { + this.newOwner = newOwner; + } + + public GrantModuleOwnershipParams withNewOwner(String newOwner) { + this.newOwner = newOwner; + return this; + } + + @JsonProperty("with_grant_option") + public Long getWithGrantOption() { + return withGrantOption; + } + + @JsonProperty("with_grant_option") + public void setWithGrantOption(Long withGrantOption) { + this.withGrantOption = withGrantOption; + } + + public GrantModuleOwnershipParams withWithGrantOption(Long withGrantOption) { + this.withGrantOption = withGrantOption; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + return ((((((((("GrantModuleOwnershipParams"+" [mod=")+ mod)+", newOwner=")+ newOwner)+", withGrantOption=")+ withGrantOption)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/ListAllTypesParams.java b/service/src/main/java/us/kbase/workspace/ListAllTypesParams.java new file mode 100644 index 000000000..c300a90d2 --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/ListAllTypesParams.java @@ -0,0 +1,65 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: ListAllTypesParams

+ *
+ * Parameters for list_all_types function.
+ *                 Optional arguments:
+ *                 boolean with_empty_modules - include empty module names, optional flag,
+ *                         default value is false.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "with_empty_modules" +}) +public class ListAllTypesParams { + + @JsonProperty("with_empty_modules") + private Long withEmptyModules; + private Map additionalProperties = new HashMap(); + + @JsonProperty("with_empty_modules") + public Long getWithEmptyModules() { + return withEmptyModules; + } + + @JsonProperty("with_empty_modules") + public void setWithEmptyModules(Long withEmptyModules) { + this.withEmptyModules = withEmptyModules; + } + + public ListAllTypesParams withWithEmptyModules(Long withEmptyModules) { + this.withEmptyModules = withEmptyModules; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + return ((((("ListAllTypesParams"+" [withEmptyModules=")+ withEmptyModules)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/ListModuleVersionsParams.java b/service/src/main/java/us/kbase/workspace/ListModuleVersionsParams.java new file mode 100644 index 000000000..2eec88129 --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/ListModuleVersionsParams.java @@ -0,0 +1,85 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: ListModuleVersionsParams

+ *
+ * Parameters for the list_module_versions function.
+ *                 Required arguments:
+ *                 One of:
+ *                 modulename mod - returns all versions of the module.
+ *                 type_string type - returns all versions of the module associated with
+ *                         the type.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "mod", + "type" +}) +public class ListModuleVersionsParams { + + @JsonProperty("mod") + private String mod; + @JsonProperty("type") + private String type; + private Map additionalProperties = new HashMap(); + + @JsonProperty("mod") + public String getMod() { + return mod; + } + + @JsonProperty("mod") + public void setMod(String mod) { + this.mod = mod; + } + + public ListModuleVersionsParams withMod(String mod) { + this.mod = mod; + return this; + } + + @JsonProperty("type") + public String getType() { + return type; + } + + @JsonProperty("type") + public void setType(String type) { + this.type = type; + } + + public ListModuleVersionsParams withType(String type) { + this.type = type; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + return ((((((("ListModuleVersionsParams"+" [mod=")+ mod)+", type=")+ type)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/ListModulesParams.java b/service/src/main/java/us/kbase/workspace/ListModulesParams.java new file mode 100644 index 000000000..29a23c5da --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/ListModulesParams.java @@ -0,0 +1,64 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: ListModulesParams

+ *
+ * Parameters for the list_modules() function.
+ *                 Optional arguments:
+ *                 username owner - only list modules owned by this user.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "owner" +}) +public class ListModulesParams { + + @JsonProperty("owner") + private String owner; + private Map additionalProperties = new HashMap(); + + @JsonProperty("owner") + public String getOwner() { + return owner; + } + + @JsonProperty("owner") + public void setOwner(String owner) { + this.owner = owner; + } + + public ListModulesParams withOwner(String owner) { + this.owner = owner; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + return ((((("ListModulesParams"+" [owner=")+ owner)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/ListObjectsParams.java b/service/src/main/java/us/kbase/workspace/ListObjectsParams.java new file mode 100644 index 000000000..037720588 --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/ListObjectsParams.java @@ -0,0 +1,461 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: ListObjectsParams

+ *
+ * Parameters for the 'list_objects' function.
+ *                 At least one, and no more than 10000, workspaces must be specified in one of the
+ *                 two following parameters. It is strongly recommended that the list is restricted to
+ *                 the workspaces of interest, or the results may be very large:
+ *                 list ids - the numerical IDs of the workspaces of interest.
+ *                 list workspaces - the names of the workspaces of interest.
+ *                 Only one of each timestamp/epoch pair may be supplied.
+ *                 Optional arguments:
+ *                 type_string type - type of the objects to be listed.  Here, omitting
+ *                         version information will find any objects that match the provided
+ *                         type - e.g. Foo.Bar-0 will match Foo.Bar-0.X where X is any
+ *                         existing version.
+ *                 permission perm - DEPRECATED, no longer useful. Filter on minimum permission by providing
+ *                         only workspaces with the desired permission levels in the input list(s).
+ *                 list savedby - filter objects by the user that saved or
+ *                         copied the object.
+ *                 usermeta meta - filter objects by the user supplied metadata. NOTE:
+ *                         only one key/value pair is supported at this time. A full map
+ *                         is provided as input for the possibility for expansion in the
+ *                         future.
+ *                 timestamp after - only return objects that were created after this
+ *                         date.
+ *                 timestamp before - only return objects that were created before this
+ *                         date.
+ *                 epoch after_epoch - only return objects that were created after this
+ *                         date.
+ *                 epoch before_epoch - only return objects that were created before this
+ *                         date.
+ *                 string startafter - a reference-like string that determines where the
+ *                         list of objects will begin. It takes the form X/Y/Z, where X is
+ *                         the workspace ID, Y the object ID, and Z the version. The version
+ *                         may be omitted, and the object ID omitted if the version is also
+ *                         omitted. After a '/' separator either an integer or no characters
+ *                         at all, including whitespace, may occur. Whitespace strings are
+ *                         ignored. If startafter is provided, after, before,
+ *                         after_epoch, before_epoch, savedby, meta, minObjectID, and
+ *                         maxObjectID may not be provided. Only objects that are ordered
+ *                         after the reference, exclusive, will be included in the
+ *                         result, and the resulting list will be sorted by reference.
+ *                 obj_id minObjectID - only return objects with an object id greater or
+ *                         equal to this value.
+ *                 obj_id maxObjectID - only return objects with an object id less than or
+ *                         equal to this value.
+ *                 boolean showDeleted - show deleted objects in workspaces to which the
+ *                         user has write access.
+ *                 boolean showOnlyDeleted - only show deleted objects in workspaces to
+ *                         which the user has write access.
+ *                 boolean showHidden - show hidden objects.
+ *                 boolean showAllVersions - show all versions of each object that match
+ *                         the filters rather than only the most recent version.
+ *                 boolean includeMetadata - include the user provided metadata in the
+ *                         returned object_info. If false (0 or null), the default, the
+ *                         metadata will be null.
+ *                 boolean excludeGlobal - DEPRECATED, no longer useful. Filter on global workspaces by
+ *                         excluding them from the input workspace list(s).
+ *                 int limit - limit the output to X objects. Default and maximum value
+ *                         is 10000. Limit values < 1 are treated as 10000, the default.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "workspaces", + "ids", + "type", + "perm", + "savedby", + "meta", + "after", + "before", + "after_epoch", + "before_epoch", + "startafter", + "minObjectID", + "maxObjectID", + "showDeleted", + "showOnlyDeleted", + "showHidden", + "showAllVersions", + "includeMetadata", + "excludeGlobal", + "limit" +}) +public class ListObjectsParams { + + @JsonProperty("workspaces") + private List workspaces; + @JsonProperty("ids") + private List ids; + @JsonProperty("type") + private java.lang.String type; + @JsonProperty("perm") + private java.lang.String perm; + @JsonProperty("savedby") + private List savedby; + @JsonProperty("meta") + private Map meta; + @JsonProperty("after") + private java.lang.String after; + @JsonProperty("before") + private java.lang.String before; + @JsonProperty("after_epoch") + private java.lang.Long afterEpoch; + @JsonProperty("before_epoch") + private java.lang.Long beforeEpoch; + @JsonProperty("startafter") + private java.lang.String startafter; + @JsonProperty("minObjectID") + private java.lang.Long minObjectID; + @JsonProperty("maxObjectID") + private java.lang.Long maxObjectID; + @JsonProperty("showDeleted") + private java.lang.Long showDeleted; + @JsonProperty("showOnlyDeleted") + private java.lang.Long showOnlyDeleted; + @JsonProperty("showHidden") + private java.lang.Long showHidden; + @JsonProperty("showAllVersions") + private java.lang.Long showAllVersions; + @JsonProperty("includeMetadata") + private java.lang.Long includeMetadata; + @JsonProperty("excludeGlobal") + private java.lang.Long excludeGlobal; + @JsonProperty("limit") + private java.lang.Long limit; + private Map additionalProperties = new HashMap(); + + @JsonProperty("workspaces") + public List getWorkspaces() { + return workspaces; + } + + @JsonProperty("workspaces") + public void setWorkspaces(List workspaces) { + this.workspaces = workspaces; + } + + public ListObjectsParams withWorkspaces(List workspaces) { + this.workspaces = workspaces; + return this; + } + + @JsonProperty("ids") + public List getIds() { + return ids; + } + + @JsonProperty("ids") + public void setIds(List ids) { + this.ids = ids; + } + + public ListObjectsParams withIds(List ids) { + this.ids = ids; + return this; + } + + @JsonProperty("type") + public java.lang.String getType() { + return type; + } + + @JsonProperty("type") + public void setType(java.lang.String type) { + this.type = type; + } + + public ListObjectsParams withType(java.lang.String type) { + this.type = type; + return this; + } + + @JsonProperty("perm") + public java.lang.String getPerm() { + return perm; + } + + @JsonProperty("perm") + public void setPerm(java.lang.String perm) { + this.perm = perm; + } + + public ListObjectsParams withPerm(java.lang.String perm) { + this.perm = perm; + return this; + } + + @JsonProperty("savedby") + public List getSavedby() { + return savedby; + } + + @JsonProperty("savedby") + public void setSavedby(List savedby) { + this.savedby = savedby; + } + + public ListObjectsParams withSavedby(List savedby) { + this.savedby = savedby; + return this; + } + + @JsonProperty("meta") + public Map getMeta() { + return meta; + } + + @JsonProperty("meta") + public void setMeta(Map meta) { + this.meta = meta; + } + + public ListObjectsParams withMeta(Map meta) { + this.meta = meta; + return this; + } + + @JsonProperty("after") + public java.lang.String getAfter() { + return after; + } + + @JsonProperty("after") + public void setAfter(java.lang.String after) { + this.after = after; + } + + public ListObjectsParams withAfter(java.lang.String after) { + this.after = after; + return this; + } + + @JsonProperty("before") + public java.lang.String getBefore() { + return before; + } + + @JsonProperty("before") + public void setBefore(java.lang.String before) { + this.before = before; + } + + public ListObjectsParams withBefore(java.lang.String before) { + this.before = before; + return this; + } + + @JsonProperty("after_epoch") + public java.lang.Long getAfterEpoch() { + return afterEpoch; + } + + @JsonProperty("after_epoch") + public void setAfterEpoch(java.lang.Long afterEpoch) { + this.afterEpoch = afterEpoch; + } + + public ListObjectsParams withAfterEpoch(java.lang.Long afterEpoch) { + this.afterEpoch = afterEpoch; + return this; + } + + @JsonProperty("before_epoch") + public java.lang.Long getBeforeEpoch() { + return beforeEpoch; + } + + @JsonProperty("before_epoch") + public void setBeforeEpoch(java.lang.Long beforeEpoch) { + this.beforeEpoch = beforeEpoch; + } + + public ListObjectsParams withBeforeEpoch(java.lang.Long beforeEpoch) { + this.beforeEpoch = beforeEpoch; + return this; + } + + @JsonProperty("startafter") + public java.lang.String getStartafter() { + return startafter; + } + + @JsonProperty("startafter") + public void setStartafter(java.lang.String startafter) { + this.startafter = startafter; + } + + public ListObjectsParams withStartafter(java.lang.String startafter) { + this.startafter = startafter; + return this; + } + + @JsonProperty("minObjectID") + public java.lang.Long getMinObjectID() { + return minObjectID; + } + + @JsonProperty("minObjectID") + public void setMinObjectID(java.lang.Long minObjectID) { + this.minObjectID = minObjectID; + } + + public ListObjectsParams withMinObjectID(java.lang.Long minObjectID) { + this.minObjectID = minObjectID; + return this; + } + + @JsonProperty("maxObjectID") + public java.lang.Long getMaxObjectID() { + return maxObjectID; + } + + @JsonProperty("maxObjectID") + public void setMaxObjectID(java.lang.Long maxObjectID) { + this.maxObjectID = maxObjectID; + } + + public ListObjectsParams withMaxObjectID(java.lang.Long maxObjectID) { + this.maxObjectID = maxObjectID; + return this; + } + + @JsonProperty("showDeleted") + public java.lang.Long getShowDeleted() { + return showDeleted; + } + + @JsonProperty("showDeleted") + public void setShowDeleted(java.lang.Long showDeleted) { + this.showDeleted = showDeleted; + } + + public ListObjectsParams withShowDeleted(java.lang.Long showDeleted) { + this.showDeleted = showDeleted; + return this; + } + + @JsonProperty("showOnlyDeleted") + public java.lang.Long getShowOnlyDeleted() { + return showOnlyDeleted; + } + + @JsonProperty("showOnlyDeleted") + public void setShowOnlyDeleted(java.lang.Long showOnlyDeleted) { + this.showOnlyDeleted = showOnlyDeleted; + } + + public ListObjectsParams withShowOnlyDeleted(java.lang.Long showOnlyDeleted) { + this.showOnlyDeleted = showOnlyDeleted; + return this; + } + + @JsonProperty("showHidden") + public java.lang.Long getShowHidden() { + return showHidden; + } + + @JsonProperty("showHidden") + public void setShowHidden(java.lang.Long showHidden) { + this.showHidden = showHidden; + } + + public ListObjectsParams withShowHidden(java.lang.Long showHidden) { + this.showHidden = showHidden; + return this; + } + + @JsonProperty("showAllVersions") + public java.lang.Long getShowAllVersions() { + return showAllVersions; + } + + @JsonProperty("showAllVersions") + public void setShowAllVersions(java.lang.Long showAllVersions) { + this.showAllVersions = showAllVersions; + } + + public ListObjectsParams withShowAllVersions(java.lang.Long showAllVersions) { + this.showAllVersions = showAllVersions; + return this; + } + + @JsonProperty("includeMetadata") + public java.lang.Long getIncludeMetadata() { + return includeMetadata; + } + + @JsonProperty("includeMetadata") + public void setIncludeMetadata(java.lang.Long includeMetadata) { + this.includeMetadata = includeMetadata; + } + + public ListObjectsParams withIncludeMetadata(java.lang.Long includeMetadata) { + this.includeMetadata = includeMetadata; + return this; + } + + @JsonProperty("excludeGlobal") + public java.lang.Long getExcludeGlobal() { + return excludeGlobal; + } + + @JsonProperty("excludeGlobal") + public void setExcludeGlobal(java.lang.Long excludeGlobal) { + this.excludeGlobal = excludeGlobal; + } + + public ListObjectsParams withExcludeGlobal(java.lang.Long excludeGlobal) { + this.excludeGlobal = excludeGlobal; + return this; + } + + @JsonProperty("limit") + public java.lang.Long getLimit() { + return limit; + } + + @JsonProperty("limit") + public void setLimit(java.lang.Long limit) { + this.limit = limit; + } + + public ListObjectsParams withLimit(java.lang.Long limit) { + this.limit = limit; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(java.lang.String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public java.lang.String toString() { + return ((((((((((((((((((((((((((((((((((((((((((("ListObjectsParams"+" [workspaces=")+ workspaces)+", ids=")+ ids)+", type=")+ type)+", perm=")+ perm)+", savedby=")+ savedby)+", meta=")+ meta)+", after=")+ after)+", before=")+ before)+", afterEpoch=")+ afterEpoch)+", beforeEpoch=")+ beforeEpoch)+", startafter=")+ startafter)+", minObjectID=")+ minObjectID)+", maxObjectID=")+ maxObjectID)+", showDeleted=")+ showDeleted)+", showOnlyDeleted=")+ showOnlyDeleted)+", showHidden=")+ showHidden)+", showAllVersions=")+ showAllVersions)+", includeMetadata=")+ includeMetadata)+", excludeGlobal=")+ excludeGlobal)+", limit=")+ limit)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/ListWorkspaceIDsParams.java b/service/src/main/java/us/kbase/workspace/ListWorkspaceIDsParams.java new file mode 100644 index 000000000..9ef10371a --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/ListWorkspaceIDsParams.java @@ -0,0 +1,105 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: ListWorkspaceIDsParams

+ *
+ * Input parameters for the "list_workspace_ids" function.
+ * Optional parameters:
+ * permission perm - filter workspaces by minimum permission level. 'None'
+ *         and 'readable' are ignored.
+ * boolean onlyGlobal - if onlyGlobal is true only include world readable
+ *         workspaces. Defaults to false. If true, excludeGlobal is ignored.
+ * boolean excludeGlobal - if excludeGlobal is true exclude world
+ *         readable workspaces. Defaults to true.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "perm", + "excludeGlobal", + "onlyGlobal" +}) +public class ListWorkspaceIDsParams { + + @JsonProperty("perm") + private String perm; + @JsonProperty("excludeGlobal") + private Long excludeGlobal; + @JsonProperty("onlyGlobal") + private Long onlyGlobal; + private Map additionalProperties = new HashMap(); + + @JsonProperty("perm") + public String getPerm() { + return perm; + } + + @JsonProperty("perm") + public void setPerm(String perm) { + this.perm = perm; + } + + public ListWorkspaceIDsParams withPerm(String perm) { + this.perm = perm; + return this; + } + + @JsonProperty("excludeGlobal") + public Long getExcludeGlobal() { + return excludeGlobal; + } + + @JsonProperty("excludeGlobal") + public void setExcludeGlobal(Long excludeGlobal) { + this.excludeGlobal = excludeGlobal; + } + + public ListWorkspaceIDsParams withExcludeGlobal(Long excludeGlobal) { + this.excludeGlobal = excludeGlobal; + return this; + } + + @JsonProperty("onlyGlobal") + public Long getOnlyGlobal() { + return onlyGlobal; + } + + @JsonProperty("onlyGlobal") + public void setOnlyGlobal(Long onlyGlobal) { + this.onlyGlobal = onlyGlobal; + } + + public ListWorkspaceIDsParams withOnlyGlobal(Long onlyGlobal) { + this.onlyGlobal = onlyGlobal; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + return ((((((((("ListWorkspaceIDsParams"+" [perm=")+ perm)+", excludeGlobal=")+ excludeGlobal)+", onlyGlobal=")+ onlyGlobal)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/ListWorkspaceIDsResults.java b/service/src/main/java/us/kbase/workspace/ListWorkspaceIDsResults.java new file mode 100644 index 000000000..9a5adedfb --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/ListWorkspaceIDsResults.java @@ -0,0 +1,85 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: ListWorkspaceIDsResults

+ *
+ * Results of the "list_workspace_ids" function.
+ * list workspaces - the workspaces to which the user has explicit
+ *         access.
+ * list pub - the workspaces to which the user has access because
+ *         they're globally readable.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "workspaces", + "pub" +}) +public class ListWorkspaceIDsResults { + + @JsonProperty("workspaces") + private List workspaces; + @JsonProperty("pub") + private List pub; + private Map additionalProperties = new HashMap(); + + @JsonProperty("workspaces") + public List getWorkspaces() { + return workspaces; + } + + @JsonProperty("workspaces") + public void setWorkspaces(List workspaces) { + this.workspaces = workspaces; + } + + public ListWorkspaceIDsResults withWorkspaces(List workspaces) { + this.workspaces = workspaces; + return this; + } + + @JsonProperty("pub") + public List getPub() { + return pub; + } + + @JsonProperty("pub") + public void setPub(List pub) { + this.pub = pub; + } + + public ListWorkspaceIDsResults withPub(List pub) { + this.pub = pub; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + return ((((((("ListWorkspaceIDsResults"+" [workspaces=")+ workspaces)+", pub=")+ pub)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/ListWorkspaceInfoParams.java b/service/src/main/java/us/kbase/workspace/ListWorkspaceInfoParams.java new file mode 100644 index 000000000..2580860c7 --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/ListWorkspaceInfoParams.java @@ -0,0 +1,248 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: ListWorkspaceInfoParams

+ *
+ * Input parameters for the "list_workspace_info" function.
+ * Only one of each timestamp/epoch pair may be supplied.
+ * Optional parameters:
+ * permission perm - filter workspaces by minimum permission level. 'None'
+ *         and 'readable' are ignored.
+ * list owners - filter workspaces by owner.
+ * usermeta meta - filter workspaces by the user supplied metadata. NOTE:
+ *         only one key/value pair is supported at this time. A full map
+ *         is provided as input for the possibility for expansion in the
+ *         future.
+ * timestamp after - only return workspaces that were modified after this
+ *         date.
+ * timestamp before - only return workspaces that were modified before
+ *         this date.
+ * epoch after_epoch - only return workspaces that were modified after
+ *         this date.
+ * epoch before_epoch - only return workspaces that were modified before
+ *         this date.
+ * boolean excludeGlobal - if excludeGlobal is true exclude world
+ *         readable workspaces. Defaults to false.
+ * boolean showDeleted - show deleted workspaces that are owned by the
+ *         user.
+ * boolean showOnlyDeleted - only show deleted workspaces that are owned
+ *         by the user.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "perm", + "owners", + "meta", + "after", + "before", + "after_epoch", + "before_epoch", + "excludeGlobal", + "showDeleted", + "showOnlyDeleted" +}) +public class ListWorkspaceInfoParams { + + @JsonProperty("perm") + private java.lang.String perm; + @JsonProperty("owners") + private List owners; + @JsonProperty("meta") + private Map meta; + @JsonProperty("after") + private java.lang.String after; + @JsonProperty("before") + private java.lang.String before; + @JsonProperty("after_epoch") + private Long afterEpoch; + @JsonProperty("before_epoch") + private Long beforeEpoch; + @JsonProperty("excludeGlobal") + private Long excludeGlobal; + @JsonProperty("showDeleted") + private Long showDeleted; + @JsonProperty("showOnlyDeleted") + private Long showOnlyDeleted; + private Map additionalProperties = new HashMap(); + + @JsonProperty("perm") + public java.lang.String getPerm() { + return perm; + } + + @JsonProperty("perm") + public void setPerm(java.lang.String perm) { + this.perm = perm; + } + + public ListWorkspaceInfoParams withPerm(java.lang.String perm) { + this.perm = perm; + return this; + } + + @JsonProperty("owners") + public List getOwners() { + return owners; + } + + @JsonProperty("owners") + public void setOwners(List owners) { + this.owners = owners; + } + + public ListWorkspaceInfoParams withOwners(List owners) { + this.owners = owners; + return this; + } + + @JsonProperty("meta") + public Map getMeta() { + return meta; + } + + @JsonProperty("meta") + public void setMeta(Map meta) { + this.meta = meta; + } + + public ListWorkspaceInfoParams withMeta(Map meta) { + this.meta = meta; + return this; + } + + @JsonProperty("after") + public java.lang.String getAfter() { + return after; + } + + @JsonProperty("after") + public void setAfter(java.lang.String after) { + this.after = after; + } + + public ListWorkspaceInfoParams withAfter(java.lang.String after) { + this.after = after; + return this; + } + + @JsonProperty("before") + public java.lang.String getBefore() { + return before; + } + + @JsonProperty("before") + public void setBefore(java.lang.String before) { + this.before = before; + } + + public ListWorkspaceInfoParams withBefore(java.lang.String before) { + this.before = before; + return this; + } + + @JsonProperty("after_epoch") + public Long getAfterEpoch() { + return afterEpoch; + } + + @JsonProperty("after_epoch") + public void setAfterEpoch(Long afterEpoch) { + this.afterEpoch = afterEpoch; + } + + public ListWorkspaceInfoParams withAfterEpoch(Long afterEpoch) { + this.afterEpoch = afterEpoch; + return this; + } + + @JsonProperty("before_epoch") + public Long getBeforeEpoch() { + return beforeEpoch; + } + + @JsonProperty("before_epoch") + public void setBeforeEpoch(Long beforeEpoch) { + this.beforeEpoch = beforeEpoch; + } + + public ListWorkspaceInfoParams withBeforeEpoch(Long beforeEpoch) { + this.beforeEpoch = beforeEpoch; + return this; + } + + @JsonProperty("excludeGlobal") + public Long getExcludeGlobal() { + return excludeGlobal; + } + + @JsonProperty("excludeGlobal") + public void setExcludeGlobal(Long excludeGlobal) { + this.excludeGlobal = excludeGlobal; + } + + public ListWorkspaceInfoParams withExcludeGlobal(Long excludeGlobal) { + this.excludeGlobal = excludeGlobal; + return this; + } + + @JsonProperty("showDeleted") + public Long getShowDeleted() { + return showDeleted; + } + + @JsonProperty("showDeleted") + public void setShowDeleted(Long showDeleted) { + this.showDeleted = showDeleted; + } + + public ListWorkspaceInfoParams withShowDeleted(Long showDeleted) { + this.showDeleted = showDeleted; + return this; + } + + @JsonProperty("showOnlyDeleted") + public Long getShowOnlyDeleted() { + return showOnlyDeleted; + } + + @JsonProperty("showOnlyDeleted") + public void setShowOnlyDeleted(Long showOnlyDeleted) { + this.showOnlyDeleted = showOnlyDeleted; + } + + public ListWorkspaceInfoParams withShowOnlyDeleted(Long showOnlyDeleted) { + this.showOnlyDeleted = showOnlyDeleted; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(java.lang.String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public java.lang.String toString() { + return ((((((((((((((((((((((("ListWorkspaceInfoParams"+" [perm=")+ perm)+", owners=")+ owners)+", meta=")+ meta)+", after=")+ after)+", before=")+ before)+", afterEpoch=")+ afterEpoch)+", beforeEpoch=")+ beforeEpoch)+", excludeGlobal=")+ excludeGlobal)+", showDeleted=")+ showDeleted)+", showOnlyDeleted=")+ showOnlyDeleted)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/ListWorkspaceObjectsParams.java b/service/src/main/java/us/kbase/workspace/ListWorkspaceObjectsParams.java new file mode 100644 index 000000000..33902f210 --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/ListWorkspaceObjectsParams.java @@ -0,0 +1,130 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: list_workspace_objects_params

+ *
+ * Input parameters for the "list_workspace_objects" function. Provided
+ * for backwards compatibility.
+ * Required arguments:
+ * ws_name workspace - Name of the workspace for which objects should be
+ *         listed
+ * Optional arguments:
+ * type_string type - type of the objects to be listed. Here, omitting
+ *         version information will find any objects that match the provided
+ *         type - e.g. Foo.Bar-0 will match Foo.Bar-0.X where X is any
+ *         existing version.
+ * boolean showDeletedObject - show objects that have been deleted
+ * string auth - the authentication token of the KBase account requesting
+ *         access. Overrides the client provided authorization credentials if
+ *         they exist.
+ * @deprecated Workspace.ListObjectsParams
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "workspace", + "type", + "showDeletedObject", + "auth" +}) +public class ListWorkspaceObjectsParams { + + @JsonProperty("workspace") + private String workspace; + @JsonProperty("type") + private String type; + @JsonProperty("showDeletedObject") + private Long showDeletedObject; + @JsonProperty("auth") + private String auth; + private Map additionalProperties = new HashMap(); + + @JsonProperty("workspace") + public String getWorkspace() { + return workspace; + } + + @JsonProperty("workspace") + public void setWorkspace(String workspace) { + this.workspace = workspace; + } + + public ListWorkspaceObjectsParams withWorkspace(String workspace) { + this.workspace = workspace; + return this; + } + + @JsonProperty("type") + public String getType() { + return type; + } + + @JsonProperty("type") + public void setType(String type) { + this.type = type; + } + + public ListWorkspaceObjectsParams withType(String type) { + this.type = type; + return this; + } + + @JsonProperty("showDeletedObject") + public Long getShowDeletedObject() { + return showDeletedObject; + } + + @JsonProperty("showDeletedObject") + public void setShowDeletedObject(Long showDeletedObject) { + this.showDeletedObject = showDeletedObject; + } + + public ListWorkspaceObjectsParams withShowDeletedObject(Long showDeletedObject) { + this.showDeletedObject = showDeletedObject; + return this; + } + + @JsonProperty("auth") + public String getAuth() { + return auth; + } + + @JsonProperty("auth") + public void setAuth(String auth) { + this.auth = auth; + } + + public ListWorkspaceObjectsParams withAuth(String auth) { + this.auth = auth; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + return ((((((((((("ListWorkspaceObjectsParams"+" [workspace=")+ workspace)+", type=")+ type)+", showDeletedObject=")+ showDeletedObject)+", auth=")+ auth)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/ListWorkspacesParams.java b/service/src/main/java/us/kbase/workspace/ListWorkspacesParams.java new file mode 100644 index 000000000..7afe25dc8 --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/ListWorkspacesParams.java @@ -0,0 +1,88 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: list_workspaces_params

+ *
+ * Input parameters for the "list_workspaces" function. Provided for
+ * backwards compatibility.
+ * Optional parameters:
+ * string auth - the authentication token of the KBase account accessing
+ *         the list of workspaces. Overrides the client provided authorization
+ *         credentials if they exist.
+ * boolean excludeGlobal - if excludeGlobal is true exclude world
+ *         readable workspaces. Defaults to false.
+ * @deprecated Workspace.ListWorkspaceInfoParams
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "auth", + "excludeGlobal" +}) +public class ListWorkspacesParams { + + @JsonProperty("auth") + private String auth; + @JsonProperty("excludeGlobal") + private Long excludeGlobal; + private Map additionalProperties = new HashMap(); + + @JsonProperty("auth") + public String getAuth() { + return auth; + } + + @JsonProperty("auth") + public void setAuth(String auth) { + this.auth = auth; + } + + public ListWorkspacesParams withAuth(String auth) { + this.auth = auth; + return this; + } + + @JsonProperty("excludeGlobal") + public Long getExcludeGlobal() { + return excludeGlobal; + } + + @JsonProperty("excludeGlobal") + public void setExcludeGlobal(Long excludeGlobal) { + this.excludeGlobal = excludeGlobal; + } + + public ListWorkspacesParams withExcludeGlobal(Long excludeGlobal) { + this.excludeGlobal = excludeGlobal; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + return ((((((("ListWorkspacesParams"+" [auth=")+ auth)+", excludeGlobal=")+ excludeGlobal)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/ModuleInfo.java b/service/src/main/java/us/kbase/workspace/ModuleInfo.java new file mode 100644 index 000000000..f3724e221 --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/ModuleInfo.java @@ -0,0 +1,219 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: ModuleInfo

+ *
+ * Information about a module.
+ *                 list owners - the owners of the module.
+ *                 spec_version ver - the version of the module.
+ *                 typespec spec - the typespec.
+ *                 string description - the description of the module from the typespec.
+ *                 mapping types - the types associated with this
+ *                         module and their JSON schema.
+ *                 mapping included_spec_version - names of
+ *                         included modules associated with their versions.
+ *                 string chsum - the md5 checksum of the object.
+ *                 list functions - list of names of functions registered in spec.
+ *                 boolean is_released - shows if this version of module was released (and
+ *                         hence can be seen by others).
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "owners", + "ver", + "spec", + "description", + "types", + "included_spec_version", + "chsum", + "functions", + "is_released" +}) +public class ModuleInfo { + + @JsonProperty("owners") + private List owners; + @JsonProperty("ver") + private java.lang.Long ver; + @JsonProperty("spec") + private java.lang.String spec; + @JsonProperty("description") + private java.lang.String description; + @JsonProperty("types") + private Map types; + @JsonProperty("included_spec_version") + private Map includedSpecVersion; + @JsonProperty("chsum") + private java.lang.String chsum; + @JsonProperty("functions") + private List functions; + @JsonProperty("is_released") + private java.lang.Long isReleased; + private Map additionalProperties = new HashMap(); + + @JsonProperty("owners") + public List getOwners() { + return owners; + } + + @JsonProperty("owners") + public void setOwners(List owners) { + this.owners = owners; + } + + public ModuleInfo withOwners(List owners) { + this.owners = owners; + return this; + } + + @JsonProperty("ver") + public java.lang.Long getVer() { + return ver; + } + + @JsonProperty("ver") + public void setVer(java.lang.Long ver) { + this.ver = ver; + } + + public ModuleInfo withVer(java.lang.Long ver) { + this.ver = ver; + return this; + } + + @JsonProperty("spec") + public java.lang.String getSpec() { + return spec; + } + + @JsonProperty("spec") + public void setSpec(java.lang.String spec) { + this.spec = spec; + } + + public ModuleInfo withSpec(java.lang.String spec) { + this.spec = spec; + return this; + } + + @JsonProperty("description") + public java.lang.String getDescription() { + return description; + } + + @JsonProperty("description") + public void setDescription(java.lang.String description) { + this.description = description; + } + + public ModuleInfo withDescription(java.lang.String description) { + this.description = description; + return this; + } + + @JsonProperty("types") + public Map getTypes() { + return types; + } + + @JsonProperty("types") + public void setTypes(Map types) { + this.types = types; + } + + public ModuleInfo withTypes(Map types) { + this.types = types; + return this; + } + + @JsonProperty("included_spec_version") + public Map getIncludedSpecVersion() { + return includedSpecVersion; + } + + @JsonProperty("included_spec_version") + public void setIncludedSpecVersion(Map includedSpecVersion) { + this.includedSpecVersion = includedSpecVersion; + } + + public ModuleInfo withIncludedSpecVersion(Map includedSpecVersion) { + this.includedSpecVersion = includedSpecVersion; + return this; + } + + @JsonProperty("chsum") + public java.lang.String getChsum() { + return chsum; + } + + @JsonProperty("chsum") + public void setChsum(java.lang.String chsum) { + this.chsum = chsum; + } + + public ModuleInfo withChsum(java.lang.String chsum) { + this.chsum = chsum; + return this; + } + + @JsonProperty("functions") + public List getFunctions() { + return functions; + } + + @JsonProperty("functions") + public void setFunctions(List functions) { + this.functions = functions; + } + + public ModuleInfo withFunctions(List functions) { + this.functions = functions; + return this; + } + + @JsonProperty("is_released") + public java.lang.Long getIsReleased() { + return isReleased; + } + + @JsonProperty("is_released") + public void setIsReleased(java.lang.Long isReleased) { + this.isReleased = isReleased; + } + + public ModuleInfo withIsReleased(java.lang.Long isReleased) { + this.isReleased = isReleased; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(java.lang.String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public java.lang.String toString() { + return ((((((((((((((((((((("ModuleInfo"+" [owners=")+ owners)+", ver=")+ ver)+", spec=")+ spec)+", description=")+ description)+", types=")+ types)+", includedSpecVersion=")+ includedSpecVersion)+", chsum=")+ chsum)+", functions=")+ functions)+", isReleased=")+ isReleased)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/ModuleVersions.java b/service/src/main/java/us/kbase/workspace/ModuleVersions.java new file mode 100644 index 000000000..c92a949e3 --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/ModuleVersions.java @@ -0,0 +1,104 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: ModuleVersions

+ *
+ * A set of versions from a module.
+ *                 modulename mod - the name of the module.
+ *                 list - a set or subset of versions associated with the
+ *                         module.
+ *                 list - a set or subset of released versions associated
+ *                         with the module.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "mod", + "vers", + "released_vers" +}) +public class ModuleVersions { + + @JsonProperty("mod") + private String mod; + @JsonProperty("vers") + private List vers; + @JsonProperty("released_vers") + private List releasedVers; + private Map additionalProperties = new HashMap(); + + @JsonProperty("mod") + public String getMod() { + return mod; + } + + @JsonProperty("mod") + public void setMod(String mod) { + this.mod = mod; + } + + public ModuleVersions withMod(String mod) { + this.mod = mod; + return this; + } + + @JsonProperty("vers") + public List getVers() { + return vers; + } + + @JsonProperty("vers") + public void setVers(List vers) { + this.vers = vers; + } + + public ModuleVersions withVers(List vers) { + this.vers = vers; + return this; + } + + @JsonProperty("released_vers") + public List getReleasedVers() { + return releasedVers; + } + + @JsonProperty("released_vers") + public void setReleasedVers(List releasedVers) { + this.releasedVers = releasedVers; + } + + public ModuleVersions withReleasedVers(List releasedVers) { + this.releasedVers = releasedVers; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + return ((((((((("ModuleVersions"+" [mod=")+ mod)+", vers=")+ vers)+", releasedVers=")+ releasedVers)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/ObjectData.java b/service/src/main/java/us/kbase/workspace/ObjectData.java new file mode 100644 index 000000000..ea40dc17e --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/ObjectData.java @@ -0,0 +1,414 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import us.kbase.common.service.Tuple11; +import us.kbase.common.service.UObject; + + +/** + *

Original spec-file type: ObjectData

+ *
+ * The data and supplemental info for an object.
+ *                 UnspecifiedObject data - the object's data or subset data.
+ *                 object_info info - information about the object.
+ *                 ObjectInfo infostruct - information about the object as a structure rather than a tuple.
+ *                 list path - the path to the object through the object reference graph. All the
+ *                         references in the path are absolute.
+ *                 list provenance - the object's provenance.
+ *                 username creator - the user that first saved the object to the workspace.
+ *                 ws_id orig_wsid - the id of the workspace in which this object was
+ *                                 originally saved. Missing for objects saved prior to version
+ *                                 0.4.1.
+ *                 timestamp created - the date the object was first saved to the
+ *                         workspace.
+ *                 epoch epoch - the date the object was first saved to the
+ *                         workspace.
+ *                 list refs - the references contained within the object.
+ *                 obj_ref copied - the reference of the source object if this object is
+ *                         a copy and the copy source exists and is accessible.
+ *                         null otherwise.
+ *                 boolean copy_source_inaccessible - true if the object was copied from
+ *                         another object, but that object is no longer accessible to the
+ *                         user. False otherwise.
+ *                 mapping> extracted_ids - any ids extracted
+ *                         from the object.
+ *                 string handle_error - if an error occurs while setting ACLs on
+ *                         embedded external IDs, it will be reported here. If not for historical reasons the
+ *                         parameter would be called "external_id_error".
+ *                 string handle_stacktrace - the stacktrace for handle_error. As above, the parameter
+ *                         should be called "external_id_stacktrace".
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "data", + "info", + "infostruct", + "path", + "provenance", + "creator", + "orig_wsid", + "created", + "epoch", + "refs", + "copied", + "copy_source_inaccessible", + "extracted_ids", + "handle_error", + "handle_stacktrace" +}) +public class ObjectData { + + @JsonProperty("data") + private UObject data; + @JsonProperty("info") + private Tuple11 > info; + /** + *

Original spec-file type: ObjectInfo

+ *
+     * Information about an object as a struct rather than a tuple.
+     * This allows adding fields in a backward compatible way in the future.
+     * Includes more fields than object_info.
+     * obj_id objid - the numerical id of the object.
+     * obj_name name - the name of the object.
+     * type_string type - the type of the object.
+     * timestamp save_date - the save date of the object.
+     * obj_ver ver - the version of the object.
+     * username saved_by - the user that saved or copied the object.
+     * ws_id wsid - the workspace containing the object.
+     * ws_name workspace - the workspace containing the object.
+     * string chsum - the md5 checksum of the object.
+     * int size - the size of the object in bytes.
+     * usermeta meta - arbitrary user-supplied metadata about the object.
+     * usermeta adminmeta - service administrator metadata set on an object. Unlike most
+     *         other object fields, admin metadata is mutable.
+     * list path - the path to the object.
+     * 
+ * + */ + @JsonProperty("infostruct") + private ObjectInfo infostruct; + @JsonProperty("path") + private List path; + @JsonProperty("provenance") + private List provenance; + @JsonProperty("creator") + private java.lang.String creator; + @JsonProperty("orig_wsid") + private java.lang.Long origWsid; + @JsonProperty("created") + private java.lang.String created; + @JsonProperty("epoch") + private java.lang.Long epoch; + @JsonProperty("refs") + private List refs; + @JsonProperty("copied") + private java.lang.String copied; + @JsonProperty("copy_source_inaccessible") + private java.lang.Long copySourceInaccessible; + @JsonProperty("extracted_ids") + private Map> extractedIds; + @JsonProperty("handle_error") + private java.lang.String handleError; + @JsonProperty("handle_stacktrace") + private java.lang.String handleStacktrace; + private Map additionalProperties = new HashMap(); + + @JsonProperty("data") + public UObject getData() { + return data; + } + + @JsonProperty("data") + public void setData(UObject data) { + this.data = data; + } + + public ObjectData withData(UObject data) { + this.data = data; + return this; + } + + @JsonProperty("info") + public Tuple11 > getInfo() { + return info; + } + + @JsonProperty("info") + public void setInfo(Tuple11 > info) { + this.info = info; + } + + public ObjectData withInfo(Tuple11 > info) { + this.info = info; + return this; + } + + /** + *

Original spec-file type: ObjectInfo

+ *
+     * Information about an object as a struct rather than a tuple.
+     * This allows adding fields in a backward compatible way in the future.
+     * Includes more fields than object_info.
+     * obj_id objid - the numerical id of the object.
+     * obj_name name - the name of the object.
+     * type_string type - the type of the object.
+     * timestamp save_date - the save date of the object.
+     * obj_ver ver - the version of the object.
+     * username saved_by - the user that saved or copied the object.
+     * ws_id wsid - the workspace containing the object.
+     * ws_name workspace - the workspace containing the object.
+     * string chsum - the md5 checksum of the object.
+     * int size - the size of the object in bytes.
+     * usermeta meta - arbitrary user-supplied metadata about the object.
+     * usermeta adminmeta - service administrator metadata set on an object. Unlike most
+     *         other object fields, admin metadata is mutable.
+     * list path - the path to the object.
+     * 
+ * + */ + @JsonProperty("infostruct") + public ObjectInfo getInfostruct() { + return infostruct; + } + + /** + *

Original spec-file type: ObjectInfo

+ *
+     * Information about an object as a struct rather than a tuple.
+     * This allows adding fields in a backward compatible way in the future.
+     * Includes more fields than object_info.
+     * obj_id objid - the numerical id of the object.
+     * obj_name name - the name of the object.
+     * type_string type - the type of the object.
+     * timestamp save_date - the save date of the object.
+     * obj_ver ver - the version of the object.
+     * username saved_by - the user that saved or copied the object.
+     * ws_id wsid - the workspace containing the object.
+     * ws_name workspace - the workspace containing the object.
+     * string chsum - the md5 checksum of the object.
+     * int size - the size of the object in bytes.
+     * usermeta meta - arbitrary user-supplied metadata about the object.
+     * usermeta adminmeta - service administrator metadata set on an object. Unlike most
+     *         other object fields, admin metadata is mutable.
+     * list path - the path to the object.
+     * 
+ * + */ + @JsonProperty("infostruct") + public void setInfostruct(ObjectInfo infostruct) { + this.infostruct = infostruct; + } + + public ObjectData withInfostruct(ObjectInfo infostruct) { + this.infostruct = infostruct; + return this; + } + + @JsonProperty("path") + public List getPath() { + return path; + } + + @JsonProperty("path") + public void setPath(List path) { + this.path = path; + } + + public ObjectData withPath(List path) { + this.path = path; + return this; + } + + @JsonProperty("provenance") + public List getProvenance() { + return provenance; + } + + @JsonProperty("provenance") + public void setProvenance(List provenance) { + this.provenance = provenance; + } + + public ObjectData withProvenance(List provenance) { + this.provenance = provenance; + return this; + } + + @JsonProperty("creator") + public java.lang.String getCreator() { + return creator; + } + + @JsonProperty("creator") + public void setCreator(java.lang.String creator) { + this.creator = creator; + } + + public ObjectData withCreator(java.lang.String creator) { + this.creator = creator; + return this; + } + + @JsonProperty("orig_wsid") + public java.lang.Long getOrigWsid() { + return origWsid; + } + + @JsonProperty("orig_wsid") + public void setOrigWsid(java.lang.Long origWsid) { + this.origWsid = origWsid; + } + + public ObjectData withOrigWsid(java.lang.Long origWsid) { + this.origWsid = origWsid; + return this; + } + + @JsonProperty("created") + public java.lang.String getCreated() { + return created; + } + + @JsonProperty("created") + public void setCreated(java.lang.String created) { + this.created = created; + } + + public ObjectData withCreated(java.lang.String created) { + this.created = created; + return this; + } + + @JsonProperty("epoch") + public java.lang.Long getEpoch() { + return epoch; + } + + @JsonProperty("epoch") + public void setEpoch(java.lang.Long epoch) { + this.epoch = epoch; + } + + public ObjectData withEpoch(java.lang.Long epoch) { + this.epoch = epoch; + return this; + } + + @JsonProperty("refs") + public List getRefs() { + return refs; + } + + @JsonProperty("refs") + public void setRefs(List refs) { + this.refs = refs; + } + + public ObjectData withRefs(List refs) { + this.refs = refs; + return this; + } + + @JsonProperty("copied") + public java.lang.String getCopied() { + return copied; + } + + @JsonProperty("copied") + public void setCopied(java.lang.String copied) { + this.copied = copied; + } + + public ObjectData withCopied(java.lang.String copied) { + this.copied = copied; + return this; + } + + @JsonProperty("copy_source_inaccessible") + public java.lang.Long getCopySourceInaccessible() { + return copySourceInaccessible; + } + + @JsonProperty("copy_source_inaccessible") + public void setCopySourceInaccessible(java.lang.Long copySourceInaccessible) { + this.copySourceInaccessible = copySourceInaccessible; + } + + public ObjectData withCopySourceInaccessible(java.lang.Long copySourceInaccessible) { + this.copySourceInaccessible = copySourceInaccessible; + return this; + } + + @JsonProperty("extracted_ids") + public Map> getExtractedIds() { + return extractedIds; + } + + @JsonProperty("extracted_ids") + public void setExtractedIds(Map> extractedIds) { + this.extractedIds = extractedIds; + } + + public ObjectData withExtractedIds(Map> extractedIds) { + this.extractedIds = extractedIds; + return this; + } + + @JsonProperty("handle_error") + public java.lang.String getHandleError() { + return handleError; + } + + @JsonProperty("handle_error") + public void setHandleError(java.lang.String handleError) { + this.handleError = handleError; + } + + public ObjectData withHandleError(java.lang.String handleError) { + this.handleError = handleError; + return this; + } + + @JsonProperty("handle_stacktrace") + public java.lang.String getHandleStacktrace() { + return handleStacktrace; + } + + @JsonProperty("handle_stacktrace") + public void setHandleStacktrace(java.lang.String handleStacktrace) { + this.handleStacktrace = handleStacktrace; + } + + public ObjectData withHandleStacktrace(java.lang.String handleStacktrace) { + this.handleStacktrace = handleStacktrace; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(java.lang.String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public java.lang.String toString() { + return ((((((((((((((((((((((((((((((((("ObjectData"+" [data=")+ data)+", info=")+ info)+", infostruct=")+ infostruct)+", path=")+ path)+", provenance=")+ provenance)+", creator=")+ creator)+", origWsid=")+ origWsid)+", created=")+ created)+", epoch=")+ epoch)+", refs=")+ refs)+", copied=")+ copied)+", copySourceInaccessible=")+ copySourceInaccessible)+", extractedIds=")+ extractedIds)+", handleError=")+ handleError)+", handleStacktrace=")+ handleStacktrace)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/ObjectIdentity.java b/service/src/main/java/us/kbase/workspace/ObjectIdentity.java new file mode 100644 index 000000000..e24154077 --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/ObjectIdentity.java @@ -0,0 +1,164 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: ObjectIdentity

+ *
+ * An object identifier.
+ *                 Select an object by either:
+ *                         One, and only one, of the numerical id or name of the workspace.
+ *                                 ws_id wsid - the numerical ID of the workspace.
+ *                                 ws_name workspace - the name of the workspace.
+ *                         AND
+ *                         One, and only one, of the numerical id or name of the object.
+ *                                 obj_id objid- the numerical ID of the object.
+ *                                 obj_name name - name of the object.
+ *                         OPTIONALLY
+ *                                 obj_ver ver - the version of the object.
+ *                 OR an object reference string:
+ *                         obj_ref ref - an object reference string.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "workspace", + "wsid", + "name", + "objid", + "ver", + "ref" +}) +public class ObjectIdentity { + + @JsonProperty("workspace") + private String workspace; + @JsonProperty("wsid") + private Long wsid; + @JsonProperty("name") + private String name; + @JsonProperty("objid") + private Long objid; + @JsonProperty("ver") + private Long ver; + @JsonProperty("ref") + private String ref; + private Map additionalProperties = new HashMap(); + + @JsonProperty("workspace") + public String getWorkspace() { + return workspace; + } + + @JsonProperty("workspace") + public void setWorkspace(String workspace) { + this.workspace = workspace; + } + + public ObjectIdentity withWorkspace(String workspace) { + this.workspace = workspace; + return this; + } + + @JsonProperty("wsid") + public Long getWsid() { + return wsid; + } + + @JsonProperty("wsid") + public void setWsid(Long wsid) { + this.wsid = wsid; + } + + public ObjectIdentity withWsid(Long wsid) { + this.wsid = wsid; + return this; + } + + @JsonProperty("name") + public String getName() { + return name; + } + + @JsonProperty("name") + public void setName(String name) { + this.name = name; + } + + public ObjectIdentity withName(String name) { + this.name = name; + return this; + } + + @JsonProperty("objid") + public Long getObjid() { + return objid; + } + + @JsonProperty("objid") + public void setObjid(Long objid) { + this.objid = objid; + } + + public ObjectIdentity withObjid(Long objid) { + this.objid = objid; + return this; + } + + @JsonProperty("ver") + public Long getVer() { + return ver; + } + + @JsonProperty("ver") + public void setVer(Long ver) { + this.ver = ver; + } + + public ObjectIdentity withVer(Long ver) { + this.ver = ver; + return this; + } + + @JsonProperty("ref") + public String getRef() { + return ref; + } + + @JsonProperty("ref") + public void setRef(String ref) { + this.ref = ref; + } + + public ObjectIdentity withRef(String ref) { + this.ref = ref; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + return ((((((((((((((("ObjectIdentity"+" [workspace=")+ workspace)+", wsid=")+ wsid)+", name=")+ name)+", objid=")+ objid)+", ver=")+ ver)+", ref=")+ ref)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/ObjectInfo.java b/service/src/main/java/us/kbase/workspace/ObjectInfo.java new file mode 100644 index 000000000..18d45a794 --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/ObjectInfo.java @@ -0,0 +1,295 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: ObjectInfo

+ *
+ * Information about an object as a struct rather than a tuple.
+ * This allows adding fields in a backward compatible way in the future.
+ * Includes more fields than object_info.
+ * obj_id objid - the numerical id of the object.
+ * obj_name name - the name of the object.
+ * type_string type - the type of the object.
+ * timestamp save_date - the save date of the object.
+ * obj_ver ver - the version of the object.
+ * username saved_by - the user that saved or copied the object.
+ * ws_id wsid - the workspace containing the object.
+ * ws_name workspace - the workspace containing the object.
+ * string chsum - the md5 checksum of the object.
+ * int size - the size of the object in bytes.
+ * usermeta meta - arbitrary user-supplied metadata about the object.
+ * usermeta adminmeta - service administrator metadata set on an object. Unlike most
+ *         other object fields, admin metadata is mutable.
+ * list path - the path to the object.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "objid", + "name", + "type", + "save_date", + "version", + "saved_by", + "wsid", + "workspace", + "chsum", + "size", + "meta", + "adminmeta", + "path" +}) +public class ObjectInfo { + + @JsonProperty("objid") + private Long objid; + @JsonProperty("name") + private java.lang.String name; + @JsonProperty("type") + private java.lang.String type; + @JsonProperty("save_date") + private java.lang.String saveDate; + @JsonProperty("version") + private Long version; + @JsonProperty("saved_by") + private java.lang.String savedBy; + @JsonProperty("wsid") + private Long wsid; + @JsonProperty("workspace") + private java.lang.String workspace; + @JsonProperty("chsum") + private java.lang.String chsum; + @JsonProperty("size") + private Long size; + @JsonProperty("meta") + private Map meta; + @JsonProperty("adminmeta") + private Map adminmeta; + @JsonProperty("path") + private List path; + private Map additionalProperties = new HashMap(); + + @JsonProperty("objid") + public Long getObjid() { + return objid; + } + + @JsonProperty("objid") + public void setObjid(Long objid) { + this.objid = objid; + } + + public ObjectInfo withObjid(Long objid) { + this.objid = objid; + return this; + } + + @JsonProperty("name") + public java.lang.String getName() { + return name; + } + + @JsonProperty("name") + public void setName(java.lang.String name) { + this.name = name; + } + + public ObjectInfo withName(java.lang.String name) { + this.name = name; + return this; + } + + @JsonProperty("type") + public java.lang.String getType() { + return type; + } + + @JsonProperty("type") + public void setType(java.lang.String type) { + this.type = type; + } + + public ObjectInfo withType(java.lang.String type) { + this.type = type; + return this; + } + + @JsonProperty("save_date") + public java.lang.String getSaveDate() { + return saveDate; + } + + @JsonProperty("save_date") + public void setSaveDate(java.lang.String saveDate) { + this.saveDate = saveDate; + } + + public ObjectInfo withSaveDate(java.lang.String saveDate) { + this.saveDate = saveDate; + return this; + } + + @JsonProperty("version") + public Long getVersion() { + return version; + } + + @JsonProperty("version") + public void setVersion(Long version) { + this.version = version; + } + + public ObjectInfo withVersion(Long version) { + this.version = version; + return this; + } + + @JsonProperty("saved_by") + public java.lang.String getSavedBy() { + return savedBy; + } + + @JsonProperty("saved_by") + public void setSavedBy(java.lang.String savedBy) { + this.savedBy = savedBy; + } + + public ObjectInfo withSavedBy(java.lang.String savedBy) { + this.savedBy = savedBy; + return this; + } + + @JsonProperty("wsid") + public Long getWsid() { + return wsid; + } + + @JsonProperty("wsid") + public void setWsid(Long wsid) { + this.wsid = wsid; + } + + public ObjectInfo withWsid(Long wsid) { + this.wsid = wsid; + return this; + } + + @JsonProperty("workspace") + public java.lang.String getWorkspace() { + return workspace; + } + + @JsonProperty("workspace") + public void setWorkspace(java.lang.String workspace) { + this.workspace = workspace; + } + + public ObjectInfo withWorkspace(java.lang.String workspace) { + this.workspace = workspace; + return this; + } + + @JsonProperty("chsum") + public java.lang.String getChsum() { + return chsum; + } + + @JsonProperty("chsum") + public void setChsum(java.lang.String chsum) { + this.chsum = chsum; + } + + public ObjectInfo withChsum(java.lang.String chsum) { + this.chsum = chsum; + return this; + } + + @JsonProperty("size") + public Long getSize() { + return size; + } + + @JsonProperty("size") + public void setSize(Long size) { + this.size = size; + } + + public ObjectInfo withSize(Long size) { + this.size = size; + return this; + } + + @JsonProperty("meta") + public Map getMeta() { + return meta; + } + + @JsonProperty("meta") + public void setMeta(Map meta) { + this.meta = meta; + } + + public ObjectInfo withMeta(Map meta) { + this.meta = meta; + return this; + } + + @JsonProperty("adminmeta") + public Map getAdminmeta() { + return adminmeta; + } + + @JsonProperty("adminmeta") + public void setAdminmeta(Map adminmeta) { + this.adminmeta = adminmeta; + } + + public ObjectInfo withAdminmeta(Map adminmeta) { + this.adminmeta = adminmeta; + return this; + } + + @JsonProperty("path") + public List getPath() { + return path; + } + + @JsonProperty("path") + public void setPath(List path) { + this.path = path; + } + + public ObjectInfo withPath(List path) { + this.path = path; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(java.lang.String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public java.lang.String toString() { + return ((((((((((((((((((((((((((((("ObjectInfo"+" [objid=")+ objid)+", name=")+ name)+", type=")+ type)+", saveDate=")+ saveDate)+", version=")+ version)+", savedBy=")+ savedBy)+", wsid=")+ wsid)+", workspace=")+ workspace)+", chsum=")+ chsum)+", size=")+ size)+", meta=")+ meta)+", adminmeta=")+ adminmeta)+", path=")+ path)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/ObjectMetadataUpdate.java b/service/src/main/java/us/kbase/workspace/ObjectMetadataUpdate.java new file mode 100644 index 000000000..71fb66774 --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/ObjectMetadataUpdate.java @@ -0,0 +1,163 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: ObjectMetadataUpdate

+ *
+ * An object metadata update specification.
+ *                 Required arguments:
+ *                 ObjectIdentity oi - the object to be altered
+ *                 One or both of the following arguments are required:
+ *                 usermeta new - metadata to assign to the workspace. Duplicate keys will
+ *                         be overwritten.
+ *                 list remove - these keys will be removed from the workspace
+ *                         metadata key/value pairs.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "oi", + "new", + "remove" +}) +public class ObjectMetadataUpdate { + + /** + *

Original spec-file type: ObjectIdentity

+ *
+     * An object identifier.
+     *                 Select an object by either:
+     *                         One, and only one, of the numerical id or name of the workspace.
+     *                                 ws_id wsid - the numerical ID of the workspace.
+     *                                 ws_name workspace - the name of the workspace.
+     *                         AND
+     *                         One, and only one, of the numerical id or name of the object.
+     *                                 obj_id objid- the numerical ID of the object.
+     *                                 obj_name name - name of the object.
+     *                         OPTIONALLY
+     *                                 obj_ver ver - the version of the object.
+     *                 OR an object reference string:
+     *                         obj_ref ref - an object reference string.
+     * 
+ * + */ + @JsonProperty("oi") + private ObjectIdentity oi; + @JsonProperty("new") + private Map _new; + @JsonProperty("remove") + private List remove; + private Map additionalProperties = new HashMap(); + + /** + *

Original spec-file type: ObjectIdentity

+ *
+     * An object identifier.
+     *                 Select an object by either:
+     *                         One, and only one, of the numerical id or name of the workspace.
+     *                                 ws_id wsid - the numerical ID of the workspace.
+     *                                 ws_name workspace - the name of the workspace.
+     *                         AND
+     *                         One, and only one, of the numerical id or name of the object.
+     *                                 obj_id objid- the numerical ID of the object.
+     *                                 obj_name name - name of the object.
+     *                         OPTIONALLY
+     *                                 obj_ver ver - the version of the object.
+     *                 OR an object reference string:
+     *                         obj_ref ref - an object reference string.
+     * 
+ * + */ + @JsonProperty("oi") + public ObjectIdentity getOi() { + return oi; + } + + /** + *

Original spec-file type: ObjectIdentity

+ *
+     * An object identifier.
+     *                 Select an object by either:
+     *                         One, and only one, of the numerical id or name of the workspace.
+     *                                 ws_id wsid - the numerical ID of the workspace.
+     *                                 ws_name workspace - the name of the workspace.
+     *                         AND
+     *                         One, and only one, of the numerical id or name of the object.
+     *                                 obj_id objid- the numerical ID of the object.
+     *                                 obj_name name - name of the object.
+     *                         OPTIONALLY
+     *                                 obj_ver ver - the version of the object.
+     *                 OR an object reference string:
+     *                         obj_ref ref - an object reference string.
+     * 
+ * + */ + @JsonProperty("oi") + public void setOi(ObjectIdentity oi) { + this.oi = oi; + } + + public ObjectMetadataUpdate withOi(ObjectIdentity oi) { + this.oi = oi; + return this; + } + + @JsonProperty("new") + public Map getNew() { + return _new; + } + + @JsonProperty("new") + public void setNew(Map _new) { + this._new = _new; + } + + public ObjectMetadataUpdate withNew(Map _new) { + this._new = _new; + return this; + } + + @JsonProperty("remove") + public List getRemove() { + return remove; + } + + @JsonProperty("remove") + public void setRemove(List remove) { + this.remove = remove; + } + + public ObjectMetadataUpdate withRemove(List remove) { + this.remove = remove; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(java.lang.String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public java.lang.String toString() { + return ((((((((("ObjectMetadataUpdate"+" [oi=")+ oi)+", _new=")+ _new)+", remove=")+ remove)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/ObjectProvenanceInfo.java b/service/src/main/java/us/kbase/workspace/ObjectProvenanceInfo.java new file mode 100644 index 000000000..0e7c84698 --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/ObjectProvenanceInfo.java @@ -0,0 +1,289 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import us.kbase.common.service.Tuple11; + + +/** + *

Original spec-file type: ObjectProvenanceInfo

+ *
+ * DEPRECATED
+ *                 The provenance and supplemental info for an object.
+ *                 object_info info - information about the object.
+ *                 list provenance - the object's provenance.
+ *                 username creator - the user that first saved the object to the
+ *                         workspace.
+ *                 ws_id orig_wsid - the id of the workspace in which this object was
+ *                                 originally saved. Missing for objects saved prior to version
+ *                                 0.4.1.
+ *                 timestamp created - the date the object was first saved to the
+ *                         workspace.
+ *                 epoch epoch - the date the object was first saved to the
+ *                         workspace.
+ *                 list - the references contained within the object.
+ *                 obj_ref copied - the reference of the source object if this object is
+ *                         a copy and the copy source exists and is accessible.
+ *                         null otherwise.
+ *                 boolean copy_source_inaccessible - true if the object was copied from
+ *                         another object, but that object is no longer accessible to the
+ *                         user. False otherwise.
+ *                 mapping> extracted_ids - any ids extracted
+ *                         from the object.
+ *                 string handle_error - if an error occurs while setting ACLs on
+ *                         embedded external IDs, it will be reported here. If not for historical reasons the
+ *                         parameter would be called "external_id_error".
+ *                 string handle_stacktrace - the stacktrace for handle_error. As above, the parameter
+ *                         should be called "external_id_stacktrace".
+ *                 @deprecated
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "info", + "provenance", + "creator", + "orig_wsid", + "created", + "epoch", + "refs", + "copied", + "copy_source_inaccessible", + "extracted_ids", + "handle_error", + "handle_stacktrace" +}) +public class ObjectProvenanceInfo { + + @JsonProperty("info") + private Tuple11 > info; + @JsonProperty("provenance") + private List provenance; + @JsonProperty("creator") + private java.lang.String creator; + @JsonProperty("orig_wsid") + private java.lang.Long origWsid; + @JsonProperty("created") + private java.lang.String created; + @JsonProperty("epoch") + private java.lang.Long epoch; + @JsonProperty("refs") + private List refs; + @JsonProperty("copied") + private java.lang.String copied; + @JsonProperty("copy_source_inaccessible") + private java.lang.Long copySourceInaccessible; + @JsonProperty("extracted_ids") + private Map> extractedIds; + @JsonProperty("handle_error") + private java.lang.String handleError; + @JsonProperty("handle_stacktrace") + private java.lang.String handleStacktrace; + private Map additionalProperties = new HashMap(); + + @JsonProperty("info") + public Tuple11 > getInfo() { + return info; + } + + @JsonProperty("info") + public void setInfo(Tuple11 > info) { + this.info = info; + } + + public ObjectProvenanceInfo withInfo(Tuple11 > info) { + this.info = info; + return this; + } + + @JsonProperty("provenance") + public List getProvenance() { + return provenance; + } + + @JsonProperty("provenance") + public void setProvenance(List provenance) { + this.provenance = provenance; + } + + public ObjectProvenanceInfo withProvenance(List provenance) { + this.provenance = provenance; + return this; + } + + @JsonProperty("creator") + public java.lang.String getCreator() { + return creator; + } + + @JsonProperty("creator") + public void setCreator(java.lang.String creator) { + this.creator = creator; + } + + public ObjectProvenanceInfo withCreator(java.lang.String creator) { + this.creator = creator; + return this; + } + + @JsonProperty("orig_wsid") + public java.lang.Long getOrigWsid() { + return origWsid; + } + + @JsonProperty("orig_wsid") + public void setOrigWsid(java.lang.Long origWsid) { + this.origWsid = origWsid; + } + + public ObjectProvenanceInfo withOrigWsid(java.lang.Long origWsid) { + this.origWsid = origWsid; + return this; + } + + @JsonProperty("created") + public java.lang.String getCreated() { + return created; + } + + @JsonProperty("created") + public void setCreated(java.lang.String created) { + this.created = created; + } + + public ObjectProvenanceInfo withCreated(java.lang.String created) { + this.created = created; + return this; + } + + @JsonProperty("epoch") + public java.lang.Long getEpoch() { + return epoch; + } + + @JsonProperty("epoch") + public void setEpoch(java.lang.Long epoch) { + this.epoch = epoch; + } + + public ObjectProvenanceInfo withEpoch(java.lang.Long epoch) { + this.epoch = epoch; + return this; + } + + @JsonProperty("refs") + public List getRefs() { + return refs; + } + + @JsonProperty("refs") + public void setRefs(List refs) { + this.refs = refs; + } + + public ObjectProvenanceInfo withRefs(List refs) { + this.refs = refs; + return this; + } + + @JsonProperty("copied") + public java.lang.String getCopied() { + return copied; + } + + @JsonProperty("copied") + public void setCopied(java.lang.String copied) { + this.copied = copied; + } + + public ObjectProvenanceInfo withCopied(java.lang.String copied) { + this.copied = copied; + return this; + } + + @JsonProperty("copy_source_inaccessible") + public java.lang.Long getCopySourceInaccessible() { + return copySourceInaccessible; + } + + @JsonProperty("copy_source_inaccessible") + public void setCopySourceInaccessible(java.lang.Long copySourceInaccessible) { + this.copySourceInaccessible = copySourceInaccessible; + } + + public ObjectProvenanceInfo withCopySourceInaccessible(java.lang.Long copySourceInaccessible) { + this.copySourceInaccessible = copySourceInaccessible; + return this; + } + + @JsonProperty("extracted_ids") + public Map> getExtractedIds() { + return extractedIds; + } + + @JsonProperty("extracted_ids") + public void setExtractedIds(Map> extractedIds) { + this.extractedIds = extractedIds; + } + + public ObjectProvenanceInfo withExtractedIds(Map> extractedIds) { + this.extractedIds = extractedIds; + return this; + } + + @JsonProperty("handle_error") + public java.lang.String getHandleError() { + return handleError; + } + + @JsonProperty("handle_error") + public void setHandleError(java.lang.String handleError) { + this.handleError = handleError; + } + + public ObjectProvenanceInfo withHandleError(java.lang.String handleError) { + this.handleError = handleError; + return this; + } + + @JsonProperty("handle_stacktrace") + public java.lang.String getHandleStacktrace() { + return handleStacktrace; + } + + @JsonProperty("handle_stacktrace") + public void setHandleStacktrace(java.lang.String handleStacktrace) { + this.handleStacktrace = handleStacktrace; + } + + public ObjectProvenanceInfo withHandleStacktrace(java.lang.String handleStacktrace) { + this.handleStacktrace = handleStacktrace; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(java.lang.String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public java.lang.String toString() { + return ((((((((((((((((((((((((((("ObjectProvenanceInfo"+" [info=")+ info)+", provenance=")+ provenance)+", creator=")+ creator)+", origWsid=")+ origWsid)+", created=")+ created)+", epoch=")+ epoch)+", refs=")+ refs)+", copied=")+ copied)+", copySourceInaccessible=")+ copySourceInaccessible)+", extractedIds=")+ extractedIds)+", handleError=")+ handleError)+", handleStacktrace=")+ handleStacktrace)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/ObjectSaveData.java b/service/src/main/java/us/kbase/workspace/ObjectSaveData.java new file mode 100644 index 000000000..d189d6f04 --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/ObjectSaveData.java @@ -0,0 +1,188 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import us.kbase.common.service.UObject; + + +/** + *

Original spec-file type: ObjectSaveData

+ *
+ * An object and associated data required for saving.
+ *                 Required arguments:
+ *                 type_string type - the type of the object. Omit the version information
+ *                         to use the latest version.
+ *                 UnspecifiedObject data - the object data.
+ *                 One, and only one, of:
+ *                         obj_name name - the name of the object.
+ *                         obj_id objid - the id of the object to save over.
+ *                 Optional arguments:
+ *                 usermeta meta - arbitrary user-supplied metadata for the object,
+ *                         not to exceed 16kb; if the object type specifies automatic
+ *                         metadata extraction with the 'meta ws' annotation, and your
+ *                         metadata name conflicts, then your metadata will be silently
+ *                         overwritten.
+ *                 list provenance - provenance data for the object.
+ *                 boolean hidden - true if this object should not be listed when listing
+ *                         workspace objects.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "type", + "data", + "name", + "objid", + "meta", + "provenance", + "hidden" +}) +public class ObjectSaveData { + + @JsonProperty("type") + private java.lang.String type; + @JsonProperty("data") + private UObject data; + @JsonProperty("name") + private java.lang.String name; + @JsonProperty("objid") + private Long objid; + @JsonProperty("meta") + private Map meta; + @JsonProperty("provenance") + private List provenance; + @JsonProperty("hidden") + private Long hidden; + private Map additionalProperties = new HashMap(); + + @JsonProperty("type") + public java.lang.String getType() { + return type; + } + + @JsonProperty("type") + public void setType(java.lang.String type) { + this.type = type; + } + + public ObjectSaveData withType(java.lang.String type) { + this.type = type; + return this; + } + + @JsonProperty("data") + public UObject getData() { + return data; + } + + @JsonProperty("data") + public void setData(UObject data) { + this.data = data; + } + + public ObjectSaveData withData(UObject data) { + this.data = data; + return this; + } + + @JsonProperty("name") + public java.lang.String getName() { + return name; + } + + @JsonProperty("name") + public void setName(java.lang.String name) { + this.name = name; + } + + public ObjectSaveData withName(java.lang.String name) { + this.name = name; + return this; + } + + @JsonProperty("objid") + public Long getObjid() { + return objid; + } + + @JsonProperty("objid") + public void setObjid(Long objid) { + this.objid = objid; + } + + public ObjectSaveData withObjid(Long objid) { + this.objid = objid; + return this; + } + + @JsonProperty("meta") + public Map getMeta() { + return meta; + } + + @JsonProperty("meta") + public void setMeta(Map meta) { + this.meta = meta; + } + + public ObjectSaveData withMeta(Map meta) { + this.meta = meta; + return this; + } + + @JsonProperty("provenance") + public List getProvenance() { + return provenance; + } + + @JsonProperty("provenance") + public void setProvenance(List provenance) { + this.provenance = provenance; + } + + public ObjectSaveData withProvenance(List provenance) { + this.provenance = provenance; + return this; + } + + @JsonProperty("hidden") + public Long getHidden() { + return hidden; + } + + @JsonProperty("hidden") + public void setHidden(Long hidden) { + this.hidden = hidden; + } + + public ObjectSaveData withHidden(Long hidden) { + this.hidden = hidden; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(java.lang.String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public java.lang.String toString() { + return ((((((((((((((((("ObjectSaveData"+" [type=")+ type)+", data=")+ data)+", name=")+ name)+", objid=")+ objid)+", meta=")+ meta)+", provenance=")+ provenance)+", hidden=")+ hidden)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/ObjectSpecification.java b/service/src/main/java/us/kbase/workspace/ObjectSpecification.java new file mode 100644 index 000000000..c4585e880 --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/ObjectSpecification.java @@ -0,0 +1,367 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: ObjectSpecification

+ *
+ * An Object Specification (OS). Inherits from ObjectIdentity (OI).
+ * Specifies which object, and which parts of that object, to retrieve
+ * from the Workspace Service.
+ * The fields wsid, workspace, objid, name, and ver are identical to
+ * the OI fields.
+ * The ref field's behavior is extended from OI. It maintains its
+ * previous behavior, but now also can act as a reference string. See
+ * reference following below for more information.
+ * REFERENCE FOLLOWING:
+ * Reference following guarantees that a user that has access to an
+ * object can always see a) objects that are referenced inside the object
+ * and b) objects that are referenced in the object's provenance. This
+ * ensures that the user has visibility into the entire provenance of the
+ * object and the object's object dependencies (e.g. references).
+ * The user must have at least read access to the object specified in this
+ * SO, but need not have access to any further objects in the reference
+ * chain, and those objects may be deleted.
+ * Optional reference following fields:
+ * Note that only one of the following fields may be specified.
+ * ref_chain obj_path - a path to the desired object from the object
+ *         specified in this OS. In other words, the object specified in this
+ *         OS is assumed to be accessible to the user, and the objects in
+ *         the object path represent a chain of references to the desired
+ *         object at the end of the object path. If the references are all
+ *         valid, the desired object will be returned.
+ * - OR -
+ * list obj_ref_path - shorthand for the obj_path.
+ * - OR -
+ * ref_chain to_obj_path - identical to obj_path, except that the path
+ *         is TO the object specified in this OS, rather than from the object.
+ *         In other words the object specified by wsid/objid/ref etc. is the
+ *         end of the path, and to_obj_path is the rest of the path. The user
+ *         must have access to the first object in the to_obj_path.
+ * - OR -
+ * list to_obj_ref_path - shorthand for the to_obj_path.
+ * - OR -
+ * ref_string ref - A string representing a reference path from
+ *         one object to another. Unlike the previous reference following
+ *         options, the ref_string represents the ENTIRE path from the source
+ *         object to the target object. As with the OI object, the ref field
+ *         may contain a single reference.
+ * - OR -
+ * boolean find_refence_path - This is the last, slowest, and most expensive resort
+ *         for getting a referenced object - do not use this method unless the
+ *         path to the object is unavailable by any other means. Setting the
+ *         find_refence_path parameter to true means that the workspace service will
+ *         search through the object reference graph from the object specified
+ *         in this OS to find an object that 1) the user can access, and 2)
+ *         has an unbroken reference path to the target object. If the search
+ *         succeeds, the object will be returned as normal. Note that the search
+ *         will automatically fail after a certain (but much larger than necessary
+ *         for the vast majority of cases) number of objects are traversed.
+ * OBJECT SUBSETS:
+ * When selecting a subset of an array in an object, the returned
+ * array is compressed to the size of the subset, but the ordering of
+ * the array is maintained. For example, if the array stored at the
+ * 'feature' key of a Genome object has 4000 entries, and the object paths
+ * provided are:
+ *         /feature/7
+ *         /feature/3015
+ *         /feature/700
+ * The returned feature array will be of length three and the entries will
+ * consist, in order, of the 7th, 700th, and 3015th entries of the
+ * original array.
+ * Optional object subset fields:
+ * list included - the portions of the object to include
+ *                 in the object subset.
+ * boolean strict_maps - if true, throw an exception if the subset
+ *         specification traverses a non-existent map key (default false)
+ * boolean strict_arrays - if true, throw an exception if the subset
+ *         specification exceeds the size of an array (default true)
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "workspace", + "wsid", + "name", + "objid", + "ver", + "ref", + "obj_path", + "obj_ref_path", + "to_obj_path", + "to_obj_ref_path", + "find_reference_path", + "included", + "strict_maps", + "strict_arrays" +}) +public class ObjectSpecification { + + @JsonProperty("workspace") + private java.lang.String workspace; + @JsonProperty("wsid") + private Long wsid; + @JsonProperty("name") + private java.lang.String name; + @JsonProperty("objid") + private Long objid; + @JsonProperty("ver") + private Long ver; + @JsonProperty("ref") + private java.lang.String ref; + @JsonProperty("obj_path") + private List objPath; + @JsonProperty("obj_ref_path") + private List objRefPath; + @JsonProperty("to_obj_path") + private List toObjPath; + @JsonProperty("to_obj_ref_path") + private List toObjRefPath; + @JsonProperty("find_reference_path") + private Long findReferencePath; + @JsonProperty("included") + private List included; + @JsonProperty("strict_maps") + private Long strictMaps; + @JsonProperty("strict_arrays") + private Long strictArrays; + private Map additionalProperties = new HashMap(); + + @JsonProperty("workspace") + public java.lang.String getWorkspace() { + return workspace; + } + + @JsonProperty("workspace") + public void setWorkspace(java.lang.String workspace) { + this.workspace = workspace; + } + + public ObjectSpecification withWorkspace(java.lang.String workspace) { + this.workspace = workspace; + return this; + } + + @JsonProperty("wsid") + public Long getWsid() { + return wsid; + } + + @JsonProperty("wsid") + public void setWsid(Long wsid) { + this.wsid = wsid; + } + + public ObjectSpecification withWsid(Long wsid) { + this.wsid = wsid; + return this; + } + + @JsonProperty("name") + public java.lang.String getName() { + return name; + } + + @JsonProperty("name") + public void setName(java.lang.String name) { + this.name = name; + } + + public ObjectSpecification withName(java.lang.String name) { + this.name = name; + return this; + } + + @JsonProperty("objid") + public Long getObjid() { + return objid; + } + + @JsonProperty("objid") + public void setObjid(Long objid) { + this.objid = objid; + } + + public ObjectSpecification withObjid(Long objid) { + this.objid = objid; + return this; + } + + @JsonProperty("ver") + public Long getVer() { + return ver; + } + + @JsonProperty("ver") + public void setVer(Long ver) { + this.ver = ver; + } + + public ObjectSpecification withVer(Long ver) { + this.ver = ver; + return this; + } + + @JsonProperty("ref") + public java.lang.String getRef() { + return ref; + } + + @JsonProperty("ref") + public void setRef(java.lang.String ref) { + this.ref = ref; + } + + public ObjectSpecification withRef(java.lang.String ref) { + this.ref = ref; + return this; + } + + @JsonProperty("obj_path") + public List getObjPath() { + return objPath; + } + + @JsonProperty("obj_path") + public void setObjPath(List objPath) { + this.objPath = objPath; + } + + public ObjectSpecification withObjPath(List objPath) { + this.objPath = objPath; + return this; + } + + @JsonProperty("obj_ref_path") + public List getObjRefPath() { + return objRefPath; + } + + @JsonProperty("obj_ref_path") + public void setObjRefPath(List objRefPath) { + this.objRefPath = objRefPath; + } + + public ObjectSpecification withObjRefPath(List objRefPath) { + this.objRefPath = objRefPath; + return this; + } + + @JsonProperty("to_obj_path") + public List getToObjPath() { + return toObjPath; + } + + @JsonProperty("to_obj_path") + public void setToObjPath(List toObjPath) { + this.toObjPath = toObjPath; + } + + public ObjectSpecification withToObjPath(List toObjPath) { + this.toObjPath = toObjPath; + return this; + } + + @JsonProperty("to_obj_ref_path") + public List getToObjRefPath() { + return toObjRefPath; + } + + @JsonProperty("to_obj_ref_path") + public void setToObjRefPath(List toObjRefPath) { + this.toObjRefPath = toObjRefPath; + } + + public ObjectSpecification withToObjRefPath(List toObjRefPath) { + this.toObjRefPath = toObjRefPath; + return this; + } + + @JsonProperty("find_reference_path") + public Long getFindReferencePath() { + return findReferencePath; + } + + @JsonProperty("find_reference_path") + public void setFindReferencePath(Long findReferencePath) { + this.findReferencePath = findReferencePath; + } + + public ObjectSpecification withFindReferencePath(Long findReferencePath) { + this.findReferencePath = findReferencePath; + return this; + } + + @JsonProperty("included") + public List getIncluded() { + return included; + } + + @JsonProperty("included") + public void setIncluded(List included) { + this.included = included; + } + + public ObjectSpecification withIncluded(List included) { + this.included = included; + return this; + } + + @JsonProperty("strict_maps") + public Long getStrictMaps() { + return strictMaps; + } + + @JsonProperty("strict_maps") + public void setStrictMaps(Long strictMaps) { + this.strictMaps = strictMaps; + } + + public ObjectSpecification withStrictMaps(Long strictMaps) { + this.strictMaps = strictMaps; + return this; + } + + @JsonProperty("strict_arrays") + public Long getStrictArrays() { + return strictArrays; + } + + @JsonProperty("strict_arrays") + public void setStrictArrays(Long strictArrays) { + this.strictArrays = strictArrays; + } + + public ObjectSpecification withStrictArrays(Long strictArrays) { + this.strictArrays = strictArrays; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(java.lang.String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public java.lang.String toString() { + return ((((((((((((((((((((((((((((((("ObjectSpecification"+" [workspace=")+ workspace)+", wsid=")+ wsid)+", name=")+ name)+", objid=")+ objid)+", ver=")+ ver)+", ref=")+ ref)+", objPath=")+ objPath)+", objRefPath=")+ objRefPath)+", toObjPath=")+ toObjPath)+", toObjRefPath=")+ toObjRefPath)+", findReferencePath=")+ findReferencePath)+", included=")+ included)+", strictMaps=")+ strictMaps)+", strictArrays=")+ strictArrays)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/ProvenanceAction.java b/service/src/main/java/us/kbase/workspace/ProvenanceAction.java new file mode 100644 index 000000000..bd318660a --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/ProvenanceAction.java @@ -0,0 +1,426 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import us.kbase.common.service.UObject; + + +/** + *

Original spec-file type: ProvenanceAction

+ *
+ * A provenance action.
+ *                 A provenance action (PA) is an action taken while transforming one data
+ *                 object to another. There may be several PAs taken in series. A PA is
+ *                 typically running a script, running an api command, etc. All of the
+ *                 following fields are optional, but more information provided equates to
+ *                 better data provenance.
+ *                 If a provenance action has no fields defined at all, it is silently dropped from
+ *                 the list.
+ *                 resolved_ws_objects should never be set by the user; it is set by the
+ *                 workspace service when returning data.
+ *                 On input, only one of the time or epoch may be supplied. Both are
+ *                 supplied on output.
+ *                 The maximum size of the entire provenance object, including all actions,
+ *                 is 1MB.
+ *                 timestamp time - the time the action was started
+ *                 epoch epoch - the time the action was started.
+ *                 string caller - the name or id of the invoker of this provenance
+ *                         action. In most cases, this will be the same for all PAs.
+ *                 string service - the name of the service that performed this action.
+ *                 string service_ver - the version of the service that performed this action.
+ *                 string method - the method of the service that performed this action.
+ *                 list method_params - the parameters of the method
+ *                         that performed this action. If an object in the parameters is a
+ *                         workspace object, also put the object reference in the
+ *                         input_ws_object list.
+ *                 string script - the name of the script that performed this action.
+ *                 string script_ver - the version of the script that performed this action.
+ *                 string script_command_line - the command line provided to the script
+ *                         that performed this action. If workspace objects were provided in
+ *                         the command line, also put the object reference in the
+ *                         input_ws_object list.
+ *                 list input_ws_objects - the workspace objects that
+ *                         were used as input to this action; typically these will also be
+ *                         present as parts of the method_params or the script_command_line
+ *                         arguments. A reference path into the object graph may be supplied.
+ *                 list resolved_ws_objects - the workspace objects ids from
+ *                         input_ws_objects resolved to permanent workspace object references
+ *                         by the workspace service.
+ *                 list intermediate_incoming - if the previous action produced
+ *                         output that 1) was not stored in a referrable way, and 2) is
+ *                         used as input for this action, provide it with an arbitrary and
+ *                         unique ID here, in the order of the input arguments to this action.
+ *                         These IDs can be used in the method_params argument.
+ *                 list intermediate_outgoing - if this action produced output
+ *                         that 1) was not stored in a referrable way, and 2) is
+ *                         used as input for the next action, provide it with an arbitrary and
+ *                         unique ID here, in the order of the output values from this action.
+ *                         These IDs can be used in the intermediate_incoming argument in the
+ *                         next action.
+ *                 list external_data - data external to the workspace
+ *                         that was either imported to the workspace or used to create a
+ *                         workspace object.
+ *                 list subactions - the subactions taken as a part of this
+ *                         action.
+ *                 mapping custom - user definable custom provenance
+ *                         fields and their values.
+ *                 string description - a free text description of this action.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "time", + "epoch", + "caller", + "service", + "service_ver", + "method", + "method_params", + "script", + "script_ver", + "script_command_line", + "input_ws_objects", + "resolved_ws_objects", + "intermediate_incoming", + "intermediate_outgoing", + "external_data", + "subactions", + "custom", + "description" +}) +public class ProvenanceAction { + + @JsonProperty("time") + private java.lang.String time; + @JsonProperty("epoch") + private Long epoch; + @JsonProperty("caller") + private java.lang.String caller; + @JsonProperty("service") + private java.lang.String service; + @JsonProperty("service_ver") + private java.lang.String serviceVer; + @JsonProperty("method") + private java.lang.String method; + @JsonProperty("method_params") + private List methodParams; + @JsonProperty("script") + private java.lang.String script; + @JsonProperty("script_ver") + private java.lang.String scriptVer; + @JsonProperty("script_command_line") + private java.lang.String scriptCommandLine; + @JsonProperty("input_ws_objects") + private List inputWsObjects; + @JsonProperty("resolved_ws_objects") + private List resolvedWsObjects; + @JsonProperty("intermediate_incoming") + private List intermediateIncoming; + @JsonProperty("intermediate_outgoing") + private List intermediateOutgoing; + @JsonProperty("external_data") + private List externalData; + @JsonProperty("subactions") + private List subactions; + @JsonProperty("custom") + private Map custom; + @JsonProperty("description") + private java.lang.String description; + private Map additionalProperties = new HashMap(); + + @JsonProperty("time") + public java.lang.String getTime() { + return time; + } + + @JsonProperty("time") + public void setTime(java.lang.String time) { + this.time = time; + } + + public ProvenanceAction withTime(java.lang.String time) { + this.time = time; + return this; + } + + @JsonProperty("epoch") + public Long getEpoch() { + return epoch; + } + + @JsonProperty("epoch") + public void setEpoch(Long epoch) { + this.epoch = epoch; + } + + public ProvenanceAction withEpoch(Long epoch) { + this.epoch = epoch; + return this; + } + + @JsonProperty("caller") + public java.lang.String getCaller() { + return caller; + } + + @JsonProperty("caller") + public void setCaller(java.lang.String caller) { + this.caller = caller; + } + + public ProvenanceAction withCaller(java.lang.String caller) { + this.caller = caller; + return this; + } + + @JsonProperty("service") + public java.lang.String getService() { + return service; + } + + @JsonProperty("service") + public void setService(java.lang.String service) { + this.service = service; + } + + public ProvenanceAction withService(java.lang.String service) { + this.service = service; + return this; + } + + @JsonProperty("service_ver") + public java.lang.String getServiceVer() { + return serviceVer; + } + + @JsonProperty("service_ver") + public void setServiceVer(java.lang.String serviceVer) { + this.serviceVer = serviceVer; + } + + public ProvenanceAction withServiceVer(java.lang.String serviceVer) { + this.serviceVer = serviceVer; + return this; + } + + @JsonProperty("method") + public java.lang.String getMethod() { + return method; + } + + @JsonProperty("method") + public void setMethod(java.lang.String method) { + this.method = method; + } + + public ProvenanceAction withMethod(java.lang.String method) { + this.method = method; + return this; + } + + @JsonProperty("method_params") + public List getMethodParams() { + return methodParams; + } + + @JsonProperty("method_params") + public void setMethodParams(List methodParams) { + this.methodParams = methodParams; + } + + public ProvenanceAction withMethodParams(List methodParams) { + this.methodParams = methodParams; + return this; + } + + @JsonProperty("script") + public java.lang.String getScript() { + return script; + } + + @JsonProperty("script") + public void setScript(java.lang.String script) { + this.script = script; + } + + public ProvenanceAction withScript(java.lang.String script) { + this.script = script; + return this; + } + + @JsonProperty("script_ver") + public java.lang.String getScriptVer() { + return scriptVer; + } + + @JsonProperty("script_ver") + public void setScriptVer(java.lang.String scriptVer) { + this.scriptVer = scriptVer; + } + + public ProvenanceAction withScriptVer(java.lang.String scriptVer) { + this.scriptVer = scriptVer; + return this; + } + + @JsonProperty("script_command_line") + public java.lang.String getScriptCommandLine() { + return scriptCommandLine; + } + + @JsonProperty("script_command_line") + public void setScriptCommandLine(java.lang.String scriptCommandLine) { + this.scriptCommandLine = scriptCommandLine; + } + + public ProvenanceAction withScriptCommandLine(java.lang.String scriptCommandLine) { + this.scriptCommandLine = scriptCommandLine; + return this; + } + + @JsonProperty("input_ws_objects") + public List getInputWsObjects() { + return inputWsObjects; + } + + @JsonProperty("input_ws_objects") + public void setInputWsObjects(List inputWsObjects) { + this.inputWsObjects = inputWsObjects; + } + + public ProvenanceAction withInputWsObjects(List inputWsObjects) { + this.inputWsObjects = inputWsObjects; + return this; + } + + @JsonProperty("resolved_ws_objects") + public List getResolvedWsObjects() { + return resolvedWsObjects; + } + + @JsonProperty("resolved_ws_objects") + public void setResolvedWsObjects(List resolvedWsObjects) { + this.resolvedWsObjects = resolvedWsObjects; + } + + public ProvenanceAction withResolvedWsObjects(List resolvedWsObjects) { + this.resolvedWsObjects = resolvedWsObjects; + return this; + } + + @JsonProperty("intermediate_incoming") + public List getIntermediateIncoming() { + return intermediateIncoming; + } + + @JsonProperty("intermediate_incoming") + public void setIntermediateIncoming(List intermediateIncoming) { + this.intermediateIncoming = intermediateIncoming; + } + + public ProvenanceAction withIntermediateIncoming(List intermediateIncoming) { + this.intermediateIncoming = intermediateIncoming; + return this; + } + + @JsonProperty("intermediate_outgoing") + public List getIntermediateOutgoing() { + return intermediateOutgoing; + } + + @JsonProperty("intermediate_outgoing") + public void setIntermediateOutgoing(List intermediateOutgoing) { + this.intermediateOutgoing = intermediateOutgoing; + } + + public ProvenanceAction withIntermediateOutgoing(List intermediateOutgoing) { + this.intermediateOutgoing = intermediateOutgoing; + return this; + } + + @JsonProperty("external_data") + public List getExternalData() { + return externalData; + } + + @JsonProperty("external_data") + public void setExternalData(List externalData) { + this.externalData = externalData; + } + + public ProvenanceAction withExternalData(List externalData) { + this.externalData = externalData; + return this; + } + + @JsonProperty("subactions") + public List getSubactions() { + return subactions; + } + + @JsonProperty("subactions") + public void setSubactions(List subactions) { + this.subactions = subactions; + } + + public ProvenanceAction withSubactions(List subactions) { + this.subactions = subactions; + return this; + } + + @JsonProperty("custom") + public Map getCustom() { + return custom; + } + + @JsonProperty("custom") + public void setCustom(Map custom) { + this.custom = custom; + } + + public ProvenanceAction withCustom(Map custom) { + this.custom = custom; + return this; + } + + @JsonProperty("description") + public java.lang.String getDescription() { + return description; + } + + @JsonProperty("description") + public void setDescription(java.lang.String description) { + this.description = description; + } + + public ProvenanceAction withDescription(java.lang.String description) { + this.description = description; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(java.lang.String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public java.lang.String toString() { + return ((((((((((((((((((((((((((((((((((((((("ProvenanceAction"+" [time=")+ time)+", epoch=")+ epoch)+", caller=")+ caller)+", service=")+ service)+", serviceVer=")+ serviceVer)+", method=")+ method)+", methodParams=")+ methodParams)+", script=")+ script)+", scriptVer=")+ scriptVer)+", scriptCommandLine=")+ scriptCommandLine)+", inputWsObjects=")+ inputWsObjects)+", resolvedWsObjects=")+ resolvedWsObjects)+", intermediateIncoming=")+ intermediateIncoming)+", intermediateOutgoing=")+ intermediateOutgoing)+", externalData=")+ externalData)+", subactions=")+ subactions)+", custom=")+ custom)+", description=")+ description)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/RegisterTypespecCopyParams.java b/service/src/main/java/us/kbase/workspace/RegisterTypespecCopyParams.java new file mode 100644 index 000000000..25b451fa9 --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/RegisterTypespecCopyParams.java @@ -0,0 +1,105 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: RegisterTypespecCopyParams

+ *
+ * Parameters for the register_typespec_copy function.
+ *                 Required arguments:
+ *                 string external_workspace_url - the URL of the  workspace server from
+ *                         which to copy a typespec.
+ *                 modulename mod - the name of the module in the workspace server
+ *                 Optional arguments:
+ *                 spec_version version - the version of the module in the workspace
+ *                         server
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "external_workspace_url", + "mod", + "version" +}) +public class RegisterTypespecCopyParams { + + @JsonProperty("external_workspace_url") + private String externalWorkspaceUrl; + @JsonProperty("mod") + private String mod; + @JsonProperty("version") + private Long version; + private Map additionalProperties = new HashMap(); + + @JsonProperty("external_workspace_url") + public String getExternalWorkspaceUrl() { + return externalWorkspaceUrl; + } + + @JsonProperty("external_workspace_url") + public void setExternalWorkspaceUrl(String externalWorkspaceUrl) { + this.externalWorkspaceUrl = externalWorkspaceUrl; + } + + public RegisterTypespecCopyParams withExternalWorkspaceUrl(String externalWorkspaceUrl) { + this.externalWorkspaceUrl = externalWorkspaceUrl; + return this; + } + + @JsonProperty("mod") + public String getMod() { + return mod; + } + + @JsonProperty("mod") + public void setMod(String mod) { + this.mod = mod; + } + + public RegisterTypespecCopyParams withMod(String mod) { + this.mod = mod; + return this; + } + + @JsonProperty("version") + public Long getVersion() { + return version; + } + + @JsonProperty("version") + public void setVersion(Long version) { + this.version = version; + } + + public RegisterTypespecCopyParams withVersion(Long version) { + this.version = version; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + return ((((((((("RegisterTypespecCopyParams"+" [externalWorkspaceUrl=")+ externalWorkspaceUrl)+", mod=")+ mod)+", version=")+ version)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/RegisterTypespecParams.java b/service/src/main/java/us/kbase/workspace/RegisterTypespecParams.java new file mode 100644 index 000000000..17a67931d --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/RegisterTypespecParams.java @@ -0,0 +1,194 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: RegisterTypespecParams

+ *
+ * Parameters for the register_typespec function.
+ *                 Required arguments:
+ *                 One of:
+ *                 typespec spec - the new typespec to register.
+ *                 modulename mod - the module to recompile with updated options (see below).
+ *                 Optional arguments:
+ *                 boolean dryrun - Return, but do not save, the results of compiling the
+ *                         spec. Default true. Set to false for making permanent changes.
+ *                 list new_types - types in the spec to make available in the
+ *                         workspace service. When compiling a spec for the first time, if
+ *                         this argument is empty no types will be made available. Previously
+ *                         available types remain so upon recompilation of a spec or
+ *                         compilation of a new spec.
+ *                 list remove_types - no longer make these types available in
+ *                         the workspace service for the new version of the spec. This does
+ *                         not remove versions of types previously compiled.
+ *                 mapping dependencies - By default, the
+ *                         latest released versions of spec dependencies will be included when
+ *                         compiling a spec. Specific versions can be specified here.
+ *                 spec_version prev_ver - the id of the previous version of the typespec.
+ *                         An error will be thrown if this is set and prev_ver is not the
+ *                         most recent version of the typespec. This prevents overwriting of
+ *                         changes made since retrieving a spec and compiling an edited spec.
+ *                         This argument is ignored if a modulename is passed.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "spec", + "mod", + "new_types", + "remove_types", + "dependencies", + "dryrun", + "prev_ver" +}) +public class RegisterTypespecParams { + + @JsonProperty("spec") + private java.lang.String spec; + @JsonProperty("mod") + private java.lang.String mod; + @JsonProperty("new_types") + private List newTypes; + @JsonProperty("remove_types") + private List removeTypes; + @JsonProperty("dependencies") + private Map dependencies; + @JsonProperty("dryrun") + private java.lang.Long dryrun; + @JsonProperty("prev_ver") + private java.lang.Long prevVer; + private Map additionalProperties = new HashMap(); + + @JsonProperty("spec") + public java.lang.String getSpec() { + return spec; + } + + @JsonProperty("spec") + public void setSpec(java.lang.String spec) { + this.spec = spec; + } + + public RegisterTypespecParams withSpec(java.lang.String spec) { + this.spec = spec; + return this; + } + + @JsonProperty("mod") + public java.lang.String getMod() { + return mod; + } + + @JsonProperty("mod") + public void setMod(java.lang.String mod) { + this.mod = mod; + } + + public RegisterTypespecParams withMod(java.lang.String mod) { + this.mod = mod; + return this; + } + + @JsonProperty("new_types") + public List getNewTypes() { + return newTypes; + } + + @JsonProperty("new_types") + public void setNewTypes(List newTypes) { + this.newTypes = newTypes; + } + + public RegisterTypespecParams withNewTypes(List newTypes) { + this.newTypes = newTypes; + return this; + } + + @JsonProperty("remove_types") + public List getRemoveTypes() { + return removeTypes; + } + + @JsonProperty("remove_types") + public void setRemoveTypes(List removeTypes) { + this.removeTypes = removeTypes; + } + + public RegisterTypespecParams withRemoveTypes(List removeTypes) { + this.removeTypes = removeTypes; + return this; + } + + @JsonProperty("dependencies") + public Map getDependencies() { + return dependencies; + } + + @JsonProperty("dependencies") + public void setDependencies(Map dependencies) { + this.dependencies = dependencies; + } + + public RegisterTypespecParams withDependencies(Map dependencies) { + this.dependencies = dependencies; + return this; + } + + @JsonProperty("dryrun") + public java.lang.Long getDryrun() { + return dryrun; + } + + @JsonProperty("dryrun") + public void setDryrun(java.lang.Long dryrun) { + this.dryrun = dryrun; + } + + public RegisterTypespecParams withDryrun(java.lang.Long dryrun) { + this.dryrun = dryrun; + return this; + } + + @JsonProperty("prev_ver") + public java.lang.Long getPrevVer() { + return prevVer; + } + + @JsonProperty("prev_ver") + public void setPrevVer(java.lang.Long prevVer) { + this.prevVer = prevVer; + } + + public RegisterTypespecParams withPrevVer(java.lang.Long prevVer) { + this.prevVer = prevVer; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(java.lang.String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public java.lang.String toString() { + return ((((((((((((((((("RegisterTypespecParams"+" [spec=")+ spec)+", mod=")+ mod)+", newTypes=")+ newTypes)+", removeTypes=")+ removeTypes)+", dependencies=")+ dependencies)+", dryrun=")+ dryrun)+", prevVer=")+ prevVer)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/RemoveModuleOwnershipParams.java b/service/src/main/java/us/kbase/workspace/RemoveModuleOwnershipParams.java new file mode 100644 index 000000000..11a2594b8 --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/RemoveModuleOwnershipParams.java @@ -0,0 +1,84 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: RemoveModuleOwnershipParams

+ *
+ * Parameters for the remove_module_ownership function.
+ *                 Required arguments:
+ *                 modulename mod - the module to modify.
+ *                 username old_owner - the user to remove from the module's list of
+ *                         owners.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "mod", + "old_owner" +}) +public class RemoveModuleOwnershipParams { + + @JsonProperty("mod") + private String mod; + @JsonProperty("old_owner") + private String oldOwner; + private Map additionalProperties = new HashMap(); + + @JsonProperty("mod") + public String getMod() { + return mod; + } + + @JsonProperty("mod") + public void setMod(String mod) { + this.mod = mod; + } + + public RemoveModuleOwnershipParams withMod(String mod) { + this.mod = mod; + return this; + } + + @JsonProperty("old_owner") + public String getOldOwner() { + return oldOwner; + } + + @JsonProperty("old_owner") + public void setOldOwner(String oldOwner) { + this.oldOwner = oldOwner; + } + + public RemoveModuleOwnershipParams withOldOwner(String oldOwner) { + this.oldOwner = oldOwner; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + return ((((((("RemoveModuleOwnershipParams"+" [mod=")+ mod)+", oldOwner=")+ oldOwner)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/RenameObjectParams.java b/service/src/main/java/us/kbase/workspace/RenameObjectParams.java new file mode 100644 index 000000000..042f95515 --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/RenameObjectParams.java @@ -0,0 +1,140 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: RenameObjectParams

+ *
+ * Input parameters for the 'rename_object' function.
+ *                 Required arguments:
+ *                 ObjectIdentity obj - the object to rename.
+ *                 obj_name new_name - the new name for the object.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "obj", + "new_name" +}) +public class RenameObjectParams { + + /** + *

Original spec-file type: ObjectIdentity

+ *
+     * An object identifier.
+     *                 Select an object by either:
+     *                         One, and only one, of the numerical id or name of the workspace.
+     *                                 ws_id wsid - the numerical ID of the workspace.
+     *                                 ws_name workspace - the name of the workspace.
+     *                         AND
+     *                         One, and only one, of the numerical id or name of the object.
+     *                                 obj_id objid- the numerical ID of the object.
+     *                                 obj_name name - name of the object.
+     *                         OPTIONALLY
+     *                                 obj_ver ver - the version of the object.
+     *                 OR an object reference string:
+     *                         obj_ref ref - an object reference string.
+     * 
+ * + */ + @JsonProperty("obj") + private ObjectIdentity obj; + @JsonProperty("new_name") + private String newName; + private Map additionalProperties = new HashMap(); + + /** + *

Original spec-file type: ObjectIdentity

+ *
+     * An object identifier.
+     *                 Select an object by either:
+     *                         One, and only one, of the numerical id or name of the workspace.
+     *                                 ws_id wsid - the numerical ID of the workspace.
+     *                                 ws_name workspace - the name of the workspace.
+     *                         AND
+     *                         One, and only one, of the numerical id or name of the object.
+     *                                 obj_id objid- the numerical ID of the object.
+     *                                 obj_name name - name of the object.
+     *                         OPTIONALLY
+     *                                 obj_ver ver - the version of the object.
+     *                 OR an object reference string:
+     *                         obj_ref ref - an object reference string.
+     * 
+ * + */ + @JsonProperty("obj") + public ObjectIdentity getObj() { + return obj; + } + + /** + *

Original spec-file type: ObjectIdentity

+ *
+     * An object identifier.
+     *                 Select an object by either:
+     *                         One, and only one, of the numerical id or name of the workspace.
+     *                                 ws_id wsid - the numerical ID of the workspace.
+     *                                 ws_name workspace - the name of the workspace.
+     *                         AND
+     *                         One, and only one, of the numerical id or name of the object.
+     *                                 obj_id objid- the numerical ID of the object.
+     *                                 obj_name name - name of the object.
+     *                         OPTIONALLY
+     *                                 obj_ver ver - the version of the object.
+     *                 OR an object reference string:
+     *                         obj_ref ref - an object reference string.
+     * 
+ * + */ + @JsonProperty("obj") + public void setObj(ObjectIdentity obj) { + this.obj = obj; + } + + public RenameObjectParams withObj(ObjectIdentity obj) { + this.obj = obj; + return this; + } + + @JsonProperty("new_name") + public String getNewName() { + return newName; + } + + @JsonProperty("new_name") + public void setNewName(String newName) { + this.newName = newName; + } + + public RenameObjectParams withNewName(String newName) { + this.newName = newName; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + return ((((((("RenameObjectParams"+" [obj=")+ obj)+", newName=")+ newName)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/RenameWorkspaceParams.java b/service/src/main/java/us/kbase/workspace/RenameWorkspaceParams.java new file mode 100644 index 000000000..abf7de401 --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/RenameWorkspaceParams.java @@ -0,0 +1,113 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: RenameWorkspaceParams

+ *
+ * Input parameters for the 'rename_workspace' function.
+ *                 Required arguments:
+ *                 WorkspaceIdentity wsi - the workspace to rename.
+ *                 ws_name new_name - the new name for the workspace.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "wsi", + "new_name" +}) +public class RenameWorkspaceParams { + + /** + *

Original spec-file type: WorkspaceIdentity

+ *
+     * A workspace identifier.
+     *                 Select a workspace by one, and only one, of the numerical id or name.
+     *                 ws_id id - the numerical ID of the workspace.
+     *                 ws_name workspace - the name of the workspace.
+     * 
+ * + */ + @JsonProperty("wsi") + private WorkspaceIdentity wsi; + @JsonProperty("new_name") + private String newName; + private Map additionalProperties = new HashMap(); + + /** + *

Original spec-file type: WorkspaceIdentity

+ *
+     * A workspace identifier.
+     *                 Select a workspace by one, and only one, of the numerical id or name.
+     *                 ws_id id - the numerical ID of the workspace.
+     *                 ws_name workspace - the name of the workspace.
+     * 
+ * + */ + @JsonProperty("wsi") + public WorkspaceIdentity getWsi() { + return wsi; + } + + /** + *

Original spec-file type: WorkspaceIdentity

+ *
+     * A workspace identifier.
+     *                 Select a workspace by one, and only one, of the numerical id or name.
+     *                 ws_id id - the numerical ID of the workspace.
+     *                 ws_name workspace - the name of the workspace.
+     * 
+ * + */ + @JsonProperty("wsi") + public void setWsi(WorkspaceIdentity wsi) { + this.wsi = wsi; + } + + public RenameWorkspaceParams withWsi(WorkspaceIdentity wsi) { + this.wsi = wsi; + return this; + } + + @JsonProperty("new_name") + public String getNewName() { + return newName; + } + + @JsonProperty("new_name") + public void setNewName(String newName) { + this.newName = newName; + } + + public RenameWorkspaceParams withNewName(String newName) { + this.newName = newName; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + return ((((((("RenameWorkspaceParams"+" [wsi=")+ wsi)+", newName=")+ newName)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/SaveObjectParams.java b/service/src/main/java/us/kbase/workspace/SaveObjectParams.java new file mode 100644 index 000000000..8d2dd6814 --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/SaveObjectParams.java @@ -0,0 +1,171 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import us.kbase.common.service.UObject; + + +/** + *

Original spec-file type: save_object_params

+ *
+ * Input parameters for the "save_object" function. Provided for backwards
+ * compatibility.
+ * Required arguments:
+ * type_string type - type of the object to be saved
+ * ws_name workspace - name of the workspace where the object is to be
+ *         saved
+ * obj_name id - name behind which the object will be saved in the
+ *         workspace
+ * UnspecifiedObject data - data to be saved in the workspace
+ * Optional arguments:
+ * usermeta metadata - arbitrary user-supplied metadata for the object,
+ *         not to exceed 16kb; if the object type specifies automatic
+ *         metadata extraction with the 'meta ws' annotation, and your
+ *         metadata name conflicts, then your metadata will be silently
+ *         overwritten.
+ * string auth - the authentication token of the KBase account accessing
+ *         the workspace. Overrides the client provided authorization
+ *         credentials if they exist.
+ * @deprecated
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "id", + "type", + "data", + "workspace", + "metadata", + "auth" +}) +public class SaveObjectParams { + + @JsonProperty("id") + private java.lang.String id; + @JsonProperty("type") + private java.lang.String type; + @JsonProperty("data") + private UObject data; + @JsonProperty("workspace") + private java.lang.String workspace; + @JsonProperty("metadata") + private Map metadata; + @JsonProperty("auth") + private java.lang.String auth; + private Map additionalProperties = new HashMap(); + + @JsonProperty("id") + public java.lang.String getId() { + return id; + } + + @JsonProperty("id") + public void setId(java.lang.String id) { + this.id = id; + } + + public SaveObjectParams withId(java.lang.String id) { + this.id = id; + return this; + } + + @JsonProperty("type") + public java.lang.String getType() { + return type; + } + + @JsonProperty("type") + public void setType(java.lang.String type) { + this.type = type; + } + + public SaveObjectParams withType(java.lang.String type) { + this.type = type; + return this; + } + + @JsonProperty("data") + public UObject getData() { + return data; + } + + @JsonProperty("data") + public void setData(UObject data) { + this.data = data; + } + + public SaveObjectParams withData(UObject data) { + this.data = data; + return this; + } + + @JsonProperty("workspace") + public java.lang.String getWorkspace() { + return workspace; + } + + @JsonProperty("workspace") + public void setWorkspace(java.lang.String workspace) { + this.workspace = workspace; + } + + public SaveObjectParams withWorkspace(java.lang.String workspace) { + this.workspace = workspace; + return this; + } + + @JsonProperty("metadata") + public Map getMetadata() { + return metadata; + } + + @JsonProperty("metadata") + public void setMetadata(Map metadata) { + this.metadata = metadata; + } + + public SaveObjectParams withMetadata(Map metadata) { + this.metadata = metadata; + return this; + } + + @JsonProperty("auth") + public java.lang.String getAuth() { + return auth; + } + + @JsonProperty("auth") + public void setAuth(java.lang.String auth) { + this.auth = auth; + } + + public SaveObjectParams withAuth(java.lang.String auth) { + this.auth = auth; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(java.lang.String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public java.lang.String toString() { + return ((((((((((((((("SaveObjectParams"+" [id=")+ id)+", type=")+ type)+", data=")+ data)+", workspace=")+ workspace)+", metadata=")+ metadata)+", auth=")+ auth)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/SaveObjectsParams.java b/service/src/main/java/us/kbase/workspace/SaveObjectsParams.java new file mode 100644 index 000000000..66ca46478 --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/SaveObjectsParams.java @@ -0,0 +1,104 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: SaveObjectsParams

+ *
+ * Input parameters for the "save_objects" function.
+ *                 One, and only one, of the following is required:
+ *                 ws_id id - the numerical ID of the workspace.
+ *                 ws_name workspace - the name of the workspace.
+ *                 Required arguments:
+ *                 list objects - the objects to save.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "workspace", + "id", + "objects" +}) +public class SaveObjectsParams { + + @JsonProperty("workspace") + private String workspace; + @JsonProperty("id") + private Long id; + @JsonProperty("objects") + private List objects; + private Map additionalProperties = new HashMap(); + + @JsonProperty("workspace") + public String getWorkspace() { + return workspace; + } + + @JsonProperty("workspace") + public void setWorkspace(String workspace) { + this.workspace = workspace; + } + + public SaveObjectsParams withWorkspace(String workspace) { + this.workspace = workspace; + return this; + } + + @JsonProperty("id") + public Long getId() { + return id; + } + + @JsonProperty("id") + public void setId(Long id) { + this.id = id; + } + + public SaveObjectsParams withId(Long id) { + this.id = id; + return this; + } + + @JsonProperty("objects") + public List getObjects() { + return objects; + } + + @JsonProperty("objects") + public void setObjects(List objects) { + this.objects = objects; + } + + public SaveObjectsParams withObjects(List objects) { + this.objects = objects; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + return ((((((((("SaveObjectsParams"+" [workspace=")+ workspace)+", id=")+ id)+", objects=")+ objects)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/SetGlobalPermissionsParams.java b/service/src/main/java/us/kbase/workspace/SetGlobalPermissionsParams.java new file mode 100644 index 000000000..5f95256ae --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/SetGlobalPermissionsParams.java @@ -0,0 +1,106 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: SetGlobalPermissionsParams

+ *
+ * Input parameters for the "set_global_permission" function.
+ *                 One, and only one, of the following is required:
+ *                 ws_id id - the numerical ID of the workspace.
+ *                 ws_name workspace - the name of the workspace.
+ *                 Required arguments:
+ *                 permission new_permission - the permission to assign to all users,
+ *                         either 'n' or 'r'. 'r' means that all users will be able to read
+ *                         the workspace; otherwise users must have specific permission to
+ *                         access the workspace.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "workspace", + "id", + "new_permission" +}) +public class SetGlobalPermissionsParams { + + @JsonProperty("workspace") + private String workspace; + @JsonProperty("id") + private Long id; + @JsonProperty("new_permission") + private String newPermission; + private Map additionalProperties = new HashMap(); + + @JsonProperty("workspace") + public String getWorkspace() { + return workspace; + } + + @JsonProperty("workspace") + public void setWorkspace(String workspace) { + this.workspace = workspace; + } + + public SetGlobalPermissionsParams withWorkspace(String workspace) { + this.workspace = workspace; + return this; + } + + @JsonProperty("id") + public Long getId() { + return id; + } + + @JsonProperty("id") + public void setId(Long id) { + this.id = id; + } + + public SetGlobalPermissionsParams withId(Long id) { + this.id = id; + return this; + } + + @JsonProperty("new_permission") + public String getNewPermission() { + return newPermission; + } + + @JsonProperty("new_permission") + public void setNewPermission(String newPermission) { + this.newPermission = newPermission; + } + + public SetGlobalPermissionsParams withNewPermission(String newPermission) { + this.newPermission = newPermission; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + return ((((((((("SetGlobalPermissionsParams"+" [workspace=")+ workspace)+", id=")+ id)+", newPermission=")+ newPermission)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/SetPermissionsParams.java b/service/src/main/java/us/kbase/workspace/SetPermissionsParams.java new file mode 100644 index 000000000..dccfcfc34 --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/SetPermissionsParams.java @@ -0,0 +1,123 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: SetPermissionsParams

+ *
+ * Input parameters for the "set_permissions" function.
+ *                 One, and only one, of the following is required:
+ *                 ws_id id - the numerical ID of the workspace.
+ *                 ws_name workspace - the name of the workspace.
+ *                 Required arguments:
+ *                 permission new_permission - the permission to assign to the users.
+ *                 list users - the users whose permissions will be altered.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "workspace", + "id", + "new_permission", + "users" +}) +public class SetPermissionsParams { + + @JsonProperty("workspace") + private java.lang.String workspace; + @JsonProperty("id") + private Long id; + @JsonProperty("new_permission") + private java.lang.String newPermission; + @JsonProperty("users") + private List users; + private Map additionalProperties = new HashMap(); + + @JsonProperty("workspace") + public java.lang.String getWorkspace() { + return workspace; + } + + @JsonProperty("workspace") + public void setWorkspace(java.lang.String workspace) { + this.workspace = workspace; + } + + public SetPermissionsParams withWorkspace(java.lang.String workspace) { + this.workspace = workspace; + return this; + } + + @JsonProperty("id") + public Long getId() { + return id; + } + + @JsonProperty("id") + public void setId(Long id) { + this.id = id; + } + + public SetPermissionsParams withId(Long id) { + this.id = id; + return this; + } + + @JsonProperty("new_permission") + public java.lang.String getNewPermission() { + return newPermission; + } + + @JsonProperty("new_permission") + public void setNewPermission(java.lang.String newPermission) { + this.newPermission = newPermission; + } + + public SetPermissionsParams withNewPermission(java.lang.String newPermission) { + this.newPermission = newPermission; + return this; + } + + @JsonProperty("users") + public List getUsers() { + return users; + } + + @JsonProperty("users") + public void setUsers(List users) { + this.users = users; + } + + public SetPermissionsParams withUsers(List users) { + this.users = users; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(java.lang.String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public java.lang.String toString() { + return ((((((((((("SetPermissionsParams"+" [workspace=")+ workspace)+", id=")+ id)+", newPermission=")+ newPermission)+", users=")+ users)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/SetWorkspaceDescriptionParams.java b/service/src/main/java/us/kbase/workspace/SetWorkspaceDescriptionParams.java new file mode 100644 index 000000000..cb7c85f13 --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/SetWorkspaceDescriptionParams.java @@ -0,0 +1,105 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: SetWorkspaceDescriptionParams

+ *
+ * Input parameters for the "set_workspace_description" function.
+ *                 One, and only one, of the following is required:
+ *                 ws_id id - the numerical ID of the workspace.
+ *                 ws_name workspace - the name of the workspace.
+ *                 Optional arguments:
+ *                 string description - A free-text description of the workspace, 1000
+ *                         characters max. Longer strings will be mercilessly and brutally
+ *                         truncated. If omitted, the description is set to null.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "workspace", + "id", + "description" +}) +public class SetWorkspaceDescriptionParams { + + @JsonProperty("workspace") + private String workspace; + @JsonProperty("id") + private Long id; + @JsonProperty("description") + private String description; + private Map additionalProperties = new HashMap(); + + @JsonProperty("workspace") + public String getWorkspace() { + return workspace; + } + + @JsonProperty("workspace") + public void setWorkspace(String workspace) { + this.workspace = workspace; + } + + public SetWorkspaceDescriptionParams withWorkspace(String workspace) { + this.workspace = workspace; + return this; + } + + @JsonProperty("id") + public Long getId() { + return id; + } + + @JsonProperty("id") + public void setId(Long id) { + this.id = id; + } + + public SetWorkspaceDescriptionParams withId(Long id) { + this.id = id; + return this; + } + + @JsonProperty("description") + public String getDescription() { + return description; + } + + @JsonProperty("description") + public void setDescription(String description) { + this.description = description; + } + + public SetWorkspaceDescriptionParams withDescription(String description) { + this.description = description; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + return ((((((((("SetWorkspaceDescriptionParams"+" [workspace=")+ workspace)+", id=")+ id)+", description=")+ description)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/SubAction.java b/service/src/main/java/us/kbase/workspace/SubAction.java new file mode 100644 index 000000000..c3a0ecc3e --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/SubAction.java @@ -0,0 +1,152 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: SubAction

+ *
+ * Information about a subaction that is invoked by a provenance action.
+ *                 A provenance action (PA) may invoke subactions (SA), e.g. calling a
+ *                 separate piece of code, a service, or a script. In most cases these
+ *                 calls are the same from PA to PA and so do not need to be listed in
+ *                 the provenance since providing information about the PA alone provides
+ *                 reproducibility.
+ *                 In some cases, however, SAs may change over time, such that invoking
+ *                 the same PA with the same parameters may produce different results.
+ *                 For example, if a PA calls a remote server, that server may be updated
+ *                 between a PA invoked on day T and another PA invoked on day T+1.
+ *                 The SubAction structure allows for specifying information about SAs
+ *                 that may dynamically change from PA invocation to PA invocation.
+ *                 All fields are optional but at least one field must be present.
+ *                 string name - the name of the SA.
+ *                 string ver - the version of SA.
+ *                 string code_url - a url pointing to the SA's codebase.
+ *                 string commit - a version control commit ID for the SA.
+ *                 string endpoint_url - a url pointing to the access point for the SA -
+ *                         a server url, for instance.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "name", + "ver", + "code_url", + "commit", + "endpoint_url" +}) +public class SubAction { + + @JsonProperty("name") + private String name; + @JsonProperty("ver") + private String ver; + @JsonProperty("code_url") + private String codeUrl; + @JsonProperty("commit") + private String commit; + @JsonProperty("endpoint_url") + private String endpointUrl; + private Map additionalProperties = new HashMap(); + + @JsonProperty("name") + public String getName() { + return name; + } + + @JsonProperty("name") + public void setName(String name) { + this.name = name; + } + + public SubAction withName(String name) { + this.name = name; + return this; + } + + @JsonProperty("ver") + public String getVer() { + return ver; + } + + @JsonProperty("ver") + public void setVer(String ver) { + this.ver = ver; + } + + public SubAction withVer(String ver) { + this.ver = ver; + return this; + } + + @JsonProperty("code_url") + public String getCodeUrl() { + return codeUrl; + } + + @JsonProperty("code_url") + public void setCodeUrl(String codeUrl) { + this.codeUrl = codeUrl; + } + + public SubAction withCodeUrl(String codeUrl) { + this.codeUrl = codeUrl; + return this; + } + + @JsonProperty("commit") + public String getCommit() { + return commit; + } + + @JsonProperty("commit") + public void setCommit(String commit) { + this.commit = commit; + } + + public SubAction withCommit(String commit) { + this.commit = commit; + return this; + } + + @JsonProperty("endpoint_url") + public String getEndpointUrl() { + return endpointUrl; + } + + @JsonProperty("endpoint_url") + public void setEndpointUrl(String endpointUrl) { + this.endpointUrl = endpointUrl; + } + + public SubAction withEndpointUrl(String endpointUrl) { + this.endpointUrl = endpointUrl; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + return ((((((((((((("SubAction"+" [name=")+ name)+", ver=")+ ver)+", codeUrl=")+ codeUrl)+", commit=")+ commit)+", endpointUrl=")+ endpointUrl)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/SubObjectIdentity.java b/service/src/main/java/us/kbase/workspace/SubObjectIdentity.java new file mode 100644 index 000000000..1bf1c66ae --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/SubObjectIdentity.java @@ -0,0 +1,229 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: SubObjectIdentity

+ *
+ * DEPRECATED
+ *                 An object subset identifier.
+ *                 Select a subset of an object by:
+ *                 EITHER
+ *                         One, and only one, of the numerical id or name of the workspace.
+ *                                 ws_id wsid - the numerical ID of the workspace.
+ *                                 ws_name workspace - name of the workspace.
+ *                         AND
+ *                         One, and only one, of the numerical id or name of the object.
+ *                                 obj_id objid- the numerical ID of the object.
+ *                                 obj_name name - name of the object.
+ *                         OPTIONALLY
+ *                                 obj_ver ver - the version of the object.
+ *                 OR an object reference string:
+ *                         obj_ref ref - an object reference string.
+ *                 AND a subset specification:
+ *                         list included - the portions of the object to include
+ *                                 in the object subset.
+ *                 boolean strict_maps - if true, throw an exception if the subset
+ *                         specification traverses a non-existant map key (default false)
+ *                 boolean strict_arrays - if true, throw an exception if the subset
+ *                         specification exceeds the size of an array (default true)
+ *                 @deprecated Workspace.ObjectSpecification
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "workspace", + "wsid", + "name", + "objid", + "ver", + "ref", + "included", + "strict_maps", + "strict_arrays" +}) +public class SubObjectIdentity { + + @JsonProperty("workspace") + private java.lang.String workspace; + @JsonProperty("wsid") + private Long wsid; + @JsonProperty("name") + private java.lang.String name; + @JsonProperty("objid") + private Long objid; + @JsonProperty("ver") + private Long ver; + @JsonProperty("ref") + private java.lang.String ref; + @JsonProperty("included") + private List included; + @JsonProperty("strict_maps") + private Long strictMaps; + @JsonProperty("strict_arrays") + private Long strictArrays; + private Map additionalProperties = new HashMap(); + + @JsonProperty("workspace") + public java.lang.String getWorkspace() { + return workspace; + } + + @JsonProperty("workspace") + public void setWorkspace(java.lang.String workspace) { + this.workspace = workspace; + } + + public SubObjectIdentity withWorkspace(java.lang.String workspace) { + this.workspace = workspace; + return this; + } + + @JsonProperty("wsid") + public Long getWsid() { + return wsid; + } + + @JsonProperty("wsid") + public void setWsid(Long wsid) { + this.wsid = wsid; + } + + public SubObjectIdentity withWsid(Long wsid) { + this.wsid = wsid; + return this; + } + + @JsonProperty("name") + public java.lang.String getName() { + return name; + } + + @JsonProperty("name") + public void setName(java.lang.String name) { + this.name = name; + } + + public SubObjectIdentity withName(java.lang.String name) { + this.name = name; + return this; + } + + @JsonProperty("objid") + public Long getObjid() { + return objid; + } + + @JsonProperty("objid") + public void setObjid(Long objid) { + this.objid = objid; + } + + public SubObjectIdentity withObjid(Long objid) { + this.objid = objid; + return this; + } + + @JsonProperty("ver") + public Long getVer() { + return ver; + } + + @JsonProperty("ver") + public void setVer(Long ver) { + this.ver = ver; + } + + public SubObjectIdentity withVer(Long ver) { + this.ver = ver; + return this; + } + + @JsonProperty("ref") + public java.lang.String getRef() { + return ref; + } + + @JsonProperty("ref") + public void setRef(java.lang.String ref) { + this.ref = ref; + } + + public SubObjectIdentity withRef(java.lang.String ref) { + this.ref = ref; + return this; + } + + @JsonProperty("included") + public List getIncluded() { + return included; + } + + @JsonProperty("included") + public void setIncluded(List included) { + this.included = included; + } + + public SubObjectIdentity withIncluded(List included) { + this.included = included; + return this; + } + + @JsonProperty("strict_maps") + public Long getStrictMaps() { + return strictMaps; + } + + @JsonProperty("strict_maps") + public void setStrictMaps(Long strictMaps) { + this.strictMaps = strictMaps; + } + + public SubObjectIdentity withStrictMaps(Long strictMaps) { + this.strictMaps = strictMaps; + return this; + } + + @JsonProperty("strict_arrays") + public Long getStrictArrays() { + return strictArrays; + } + + @JsonProperty("strict_arrays") + public void setStrictArrays(Long strictArrays) { + this.strictArrays = strictArrays; + } + + public SubObjectIdentity withStrictArrays(Long strictArrays) { + this.strictArrays = strictArrays; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(java.lang.String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public java.lang.String toString() { + return ((((((((((((((((((((("SubObjectIdentity"+" [workspace=")+ workspace)+", wsid=")+ wsid)+", name=")+ name)+", objid=")+ objid)+", ver=")+ ver)+", ref=")+ ref)+", included=")+ included)+", strictMaps=")+ strictMaps)+", strictArrays=")+ strictArrays)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/TypeInfo.java b/service/src/main/java/us/kbase/workspace/TypeInfo.java new file mode 100644 index 000000000..6813938e4 --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/TypeInfo.java @@ -0,0 +1,280 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: TypeInfo

+ *
+ * Information about a type
+ *                 type_string type_def - resolved type definition id.
+ *                 string description - the description of the type from spec file.
+ *                 string spec_def - reconstruction of type definition from spec file.
+ *                 jsonschema json_schema - JSON schema of this type.
+ *                 string parsing_structure - json document describing parsing structure of type
+ *                         in spec file including involved sub-types.
+ *                 list module_vers - versions of spec-files containing
+ *                         given type version.
+ *                 list released_module_vers - versions of released spec-files
+ *                         containing given type version.
+ *                 list type_vers - all versions of type with given type name.
+ *                 list released_type_vers - all released versions of type with
+ *                         given type name.
+ *                 list using_func_defs - list of functions (with versions)
+ *                         referring to this type version.
+ *                 list using_type_defs - list of types (with versions)
+ *                         referring to this type version.
+ *                 list used_type_defs - list of types (with versions)
+ *                         referred from this type version.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "type_def", + "description", + "spec_def", + "json_schema", + "parsing_structure", + "module_vers", + "released_module_vers", + "type_vers", + "released_type_vers", + "using_func_defs", + "using_type_defs", + "used_type_defs" +}) +public class TypeInfo { + + @JsonProperty("type_def") + private java.lang.String typeDef; + @JsonProperty("description") + private java.lang.String description; + @JsonProperty("spec_def") + private java.lang.String specDef; + @JsonProperty("json_schema") + private java.lang.String jsonSchema; + @JsonProperty("parsing_structure") + private java.lang.String parsingStructure; + @JsonProperty("module_vers") + private List moduleVers; + @JsonProperty("released_module_vers") + private List releasedModuleVers; + @JsonProperty("type_vers") + private List typeVers; + @JsonProperty("released_type_vers") + private List releasedTypeVers; + @JsonProperty("using_func_defs") + private List usingFuncDefs; + @JsonProperty("using_type_defs") + private List usingTypeDefs; + @JsonProperty("used_type_defs") + private List usedTypeDefs; + private Map additionalProperties = new HashMap(); + + @JsonProperty("type_def") + public java.lang.String getTypeDef() { + return typeDef; + } + + @JsonProperty("type_def") + public void setTypeDef(java.lang.String typeDef) { + this.typeDef = typeDef; + } + + public TypeInfo withTypeDef(java.lang.String typeDef) { + this.typeDef = typeDef; + return this; + } + + @JsonProperty("description") + public java.lang.String getDescription() { + return description; + } + + @JsonProperty("description") + public void setDescription(java.lang.String description) { + this.description = description; + } + + public TypeInfo withDescription(java.lang.String description) { + this.description = description; + return this; + } + + @JsonProperty("spec_def") + public java.lang.String getSpecDef() { + return specDef; + } + + @JsonProperty("spec_def") + public void setSpecDef(java.lang.String specDef) { + this.specDef = specDef; + } + + public TypeInfo withSpecDef(java.lang.String specDef) { + this.specDef = specDef; + return this; + } + + @JsonProperty("json_schema") + public java.lang.String getJsonSchema() { + return jsonSchema; + } + + @JsonProperty("json_schema") + public void setJsonSchema(java.lang.String jsonSchema) { + this.jsonSchema = jsonSchema; + } + + public TypeInfo withJsonSchema(java.lang.String jsonSchema) { + this.jsonSchema = jsonSchema; + return this; + } + + @JsonProperty("parsing_structure") + public java.lang.String getParsingStructure() { + return parsingStructure; + } + + @JsonProperty("parsing_structure") + public void setParsingStructure(java.lang.String parsingStructure) { + this.parsingStructure = parsingStructure; + } + + public TypeInfo withParsingStructure(java.lang.String parsingStructure) { + this.parsingStructure = parsingStructure; + return this; + } + + @JsonProperty("module_vers") + public List getModuleVers() { + return moduleVers; + } + + @JsonProperty("module_vers") + public void setModuleVers(List moduleVers) { + this.moduleVers = moduleVers; + } + + public TypeInfo withModuleVers(List moduleVers) { + this.moduleVers = moduleVers; + return this; + } + + @JsonProperty("released_module_vers") + public List getReleasedModuleVers() { + return releasedModuleVers; + } + + @JsonProperty("released_module_vers") + public void setReleasedModuleVers(List releasedModuleVers) { + this.releasedModuleVers = releasedModuleVers; + } + + public TypeInfo withReleasedModuleVers(List releasedModuleVers) { + this.releasedModuleVers = releasedModuleVers; + return this; + } + + @JsonProperty("type_vers") + public List getTypeVers() { + return typeVers; + } + + @JsonProperty("type_vers") + public void setTypeVers(List typeVers) { + this.typeVers = typeVers; + } + + public TypeInfo withTypeVers(List typeVers) { + this.typeVers = typeVers; + return this; + } + + @JsonProperty("released_type_vers") + public List getReleasedTypeVers() { + return releasedTypeVers; + } + + @JsonProperty("released_type_vers") + public void setReleasedTypeVers(List releasedTypeVers) { + this.releasedTypeVers = releasedTypeVers; + } + + public TypeInfo withReleasedTypeVers(List releasedTypeVers) { + this.releasedTypeVers = releasedTypeVers; + return this; + } + + @JsonProperty("using_func_defs") + public List getUsingFuncDefs() { + return usingFuncDefs; + } + + @JsonProperty("using_func_defs") + public void setUsingFuncDefs(List usingFuncDefs) { + this.usingFuncDefs = usingFuncDefs; + } + + public TypeInfo withUsingFuncDefs(List usingFuncDefs) { + this.usingFuncDefs = usingFuncDefs; + return this; + } + + @JsonProperty("using_type_defs") + public List getUsingTypeDefs() { + return usingTypeDefs; + } + + @JsonProperty("using_type_defs") + public void setUsingTypeDefs(List usingTypeDefs) { + this.usingTypeDefs = usingTypeDefs; + } + + public TypeInfo withUsingTypeDefs(List usingTypeDefs) { + this.usingTypeDefs = usingTypeDefs; + return this; + } + + @JsonProperty("used_type_defs") + public List getUsedTypeDefs() { + return usedTypeDefs; + } + + @JsonProperty("used_type_defs") + public void setUsedTypeDefs(List usedTypeDefs) { + this.usedTypeDefs = usedTypeDefs; + } + + public TypeInfo withUsedTypeDefs(List usedTypeDefs) { + this.usedTypeDefs = usedTypeDefs; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(java.lang.String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public java.lang.String toString() { + return ((((((((((((((((((((((((((("TypeInfo"+" [typeDef=")+ typeDef)+", description=")+ description)+", specDef=")+ specDef)+", jsonSchema=")+ jsonSchema)+", parsingStructure=")+ parsingStructure)+", moduleVers=")+ moduleVers)+", releasedModuleVers=")+ releasedModuleVers)+", typeVers=")+ typeVers)+", releasedTypeVers=")+ releasedTypeVers)+", usingFuncDefs=")+ usingFuncDefs)+", usingTypeDefs=")+ usingTypeDefs)+", usedTypeDefs=")+ usedTypeDefs)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/WorkspaceClient.java b/service/src/main/java/us/kbase/workspace/WorkspaceClient.java new file mode 100644 index 000000000..cd462c68b --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/WorkspaceClient.java @@ -0,0 +1,1426 @@ +package us.kbase.workspace; + +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.File; +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URL; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import us.kbase.auth.AuthToken; +import us.kbase.common.service.JsonClientCaller; +import us.kbase.common.service.JsonClientException; +import us.kbase.common.service.RpcContext; +import us.kbase.common.service.Tuple11; +import us.kbase.common.service.Tuple12; +import us.kbase.common.service.Tuple7; +import us.kbase.common.service.Tuple9; +import us.kbase.common.service.UObject; +import us.kbase.common.service.UnauthorizedException; + +/** + *

Original spec-file module name: Workspace

+ *
+ * The Workspace Service (WSS) is primarily a language independent remote storage
+ * and retrieval system for KBase typed objects (TO) defined with the KBase
+ * Interface Description Language (KIDL). It has the following primary features:
+ * - Immutable storage of TOs with
+ *         - user defined metadata
+ *         - data provenance
+ * - Versioning of TOs
+ * - Referencing from TO to TO
+ * - Typechecking of all saved objects against a KIDL specification
+ * - Collecting typed objects into a workspace
+ * - Sharing workspaces with specific KBase users or the world
+ * - Freezing and publishing workspaces
+ * 
+ */ +public class WorkspaceClient { + private JsonClientCaller caller; + private String serviceVersion = null; + private static URL DEFAULT_URL = null; + static { + try { + DEFAULT_URL = new URL("https://ci.kbase.us/services/ws"); + } catch (MalformedURLException mue) { + throw new RuntimeException("Compile error in client - bad url compiled"); + } + } + + /** Constructs a client with the default url and no user credentials.*/ + public WorkspaceClient() { + caller = new JsonClientCaller(DEFAULT_URL); + } + + + /** Constructs a client with a custom URL and no user credentials. + * @param url the URL of the service. + */ + public WorkspaceClient(URL url) { + caller = new JsonClientCaller(url); + } + /** Constructs a client with a custom URL. + * @param url the URL of the service. + * @param token the user's authorization token. + * @throws UnauthorizedException if the token is not valid. + * @throws IOException if an IOException occurs when checking the token's + * validity. + */ + public WorkspaceClient(URL url, AuthToken token) throws UnauthorizedException, IOException { + caller = new JsonClientCaller(url, token); + } + + /** Constructs a client with a custom URL. + * @param url the URL of the service. + * @param user the user name. + * @param password the password for the user name. + * @throws UnauthorizedException if the credentials are not valid. + * @throws IOException if an IOException occurs when checking the user's + * credentials. + */ + public WorkspaceClient(URL url, String user, String password) throws UnauthorizedException, IOException { + caller = new JsonClientCaller(url, user, password); + } + + /** Constructs a client with a custom URL + * and a custom authorization service URL. + * @param url the URL of the service. + * @param user the user name. + * @param password the password for the user name. + * @param auth the URL of the authorization server. + * @throws UnauthorizedException if the credentials are not valid. + * @throws IOException if an IOException occurs when checking the user's + * credentials. + */ + public WorkspaceClient(URL url, String user, String password, URL auth) throws UnauthorizedException, IOException { + caller = new JsonClientCaller(url, user, password, auth); + } + + /** Constructs a client with the default URL. + * @param token the user's authorization token. + * @throws UnauthorizedException if the token is not valid. + * @throws IOException if an IOException occurs when checking the token's + * validity. + */ + public WorkspaceClient(AuthToken token) throws UnauthorizedException, IOException { + caller = new JsonClientCaller(DEFAULT_URL, token); + } + + /** Constructs a client with the default URL. + * @param user the user name. + * @param password the password for the user name. + * @throws UnauthorizedException if the credentials are not valid. + * @throws IOException if an IOException occurs when checking the user's + * credentials. + */ + public WorkspaceClient(String user, String password) throws UnauthorizedException, IOException { + caller = new JsonClientCaller(DEFAULT_URL, user, password); + } + + /** Get the token this client uses to communicate with the server. + * @return the authorization token. + */ + public AuthToken getToken() { + return caller.getToken(); + } + + /** Get the URL of the service with which this client communicates. + * @return the service URL. + */ + public URL getURL() { + return caller.getURL(); + } + + /** Set the timeout between establishing a connection to a server and + * receiving a response. A value of zero or null implies no timeout. + * @param milliseconds the milliseconds to wait before timing out when + * attempting to read from a server. + */ + public void setConnectionReadTimeOut(Integer milliseconds) { + this.caller.setConnectionReadTimeOut(milliseconds); + } + + /** Check if this client allows insecure http (vs https) connections. + * @return true if insecure connections are allowed. + */ + public boolean isInsecureHttpConnectionAllowed() { + return caller.isInsecureHttpConnectionAllowed(); + } + + /** Deprecated. Use isInsecureHttpConnectionAllowed(). + * @deprecated + */ + public boolean isAuthAllowedForHttp() { + return caller.isAuthAllowedForHttp(); + } + + /** Set whether insecure http (vs https) connections should be allowed by + * this client. + * @param allowed true to allow insecure connections. Default false + */ + public void setIsInsecureHttpConnectionAllowed(boolean allowed) { + caller.setInsecureHttpConnectionAllowed(allowed); + } + + /** Deprecated. Use setIsInsecureHttpConnectionAllowed(). + * @deprecated + */ + public void setAuthAllowedForHttp(boolean isAuthAllowedForHttp) { + caller.setAuthAllowedForHttp(isAuthAllowedForHttp); + } + + /** Set whether all SSL certificates, including self-signed certificates, + * should be trusted. + * @param trustAll true to trust all certificates. Default false. + */ + public void setAllSSLCertificatesTrusted(final boolean trustAll) { + caller.setAllSSLCertificatesTrusted(trustAll); + } + + /** Check if this client trusts all SSL certificates, including + * self-signed certificates. + * @return true if all certificates are trusted. + */ + public boolean isAllSSLCertificatesTrusted() { + return caller.isAllSSLCertificatesTrusted(); + } + /** Sets streaming mode on. In this case, the data will be streamed to + * the server in chunks as it is read from disk rather than buffered in + * memory. Many servers are not compatible with this feature. + * @param streamRequest true to set streaming mode on, false otherwise. + */ + public void setStreamingModeOn(boolean streamRequest) { + caller.setStreamingModeOn(streamRequest); + } + + /** Returns true if streaming mode is on. + * @return true if streaming mode is on. + */ + public boolean isStreamingModeOn() { + return caller.isStreamingModeOn(); + } + + public void _setFileForNextRpcResponse(File f) { + caller.setFileForNextRpcResponse(f); + } + + public String getServiceVersion() { + return this.serviceVersion; + } + + public void setServiceVersion(String newValue) { + this.serviceVersion = newValue; + } + + /** + *

Original spec-file function name: ver

+ *
+     * Returns the version of the workspace service.
+     * 
+ * @return parameter "ver" of String + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public String ver(RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + TypeReference> retType = new TypeReference>() {}; + List res = caller.jsonrpcCall("Workspace.ver", args, retType, true, false, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: create_workspace

+ *
+     * Creates a new workspace.
+     * 
+ * @param params instance of type {@link us.kbase.workspace.CreateWorkspaceParams CreateWorkspaceParams} + * @return parameter "info" of original type "workspace_info" (Information about a workspace. ws_id id - the numerical ID of the workspace. ws_name workspace - name of the workspace. username owner - name of the user who owns (e.g. created) this workspace. timestamp moddate - date when the workspace was last modified. int max_objid - the maximum object ID appearing in this workspace. Since cloning a workspace preserves object IDs, this number may be greater than the number of objects in a newly cloned workspace. permission user_permission - permissions for the authenticated user of this workspace. permission globalread - whether this workspace is globally readable. lock_status lockstat - the status of the workspace lock. usermeta metadata - arbitrary user-supplied metadata about the workspace.) → tuple of size 9: parameter "id" of original type "ws_id" (The unique, permanent numerical ID of a workspace.), parameter "workspace" of original type "ws_name" (A string used as a name for a workspace. Any string consisting of alphanumeric characters and "_", ".", or "-" that is not an integer is acceptable. The name may optionally be prefixed with the workspace owner's user name and a colon, e.g. kbasetest:my_workspace.), parameter "owner" of original type "username" (Login name of a KBase user account.), parameter "moddate" of original type "timestamp" (A time in the format YYYY-MM-DDThh:mm:ssZ, where Z is either the character Z (representing the UTC timezone) or the difference in time to UTC in the format +/-HHMM, eg: 2012-12-17T23:24:06-0500 (EST time) 2013-04-03T08:56:32+0000 (UTC time) 2013-04-03T08:56:32Z (UTC time)), parameter "max_objid" of Long, parameter "user_permission" of original type "permission" (Represents the permissions a user or users have to a workspace: 'a' - administrator. All operations allowed. 'w' - read/write. 'r' - read. 'n' - no permissions.), parameter "globalread" of original type "permission" (Represents the permissions a user or users have to a workspace: 'a' - administrator. All operations allowed. 'w' - read/write. 'r' - read. 'n' - no permissions.), parameter "lockstat" of original type "lock_status" (The lock status of a workspace. One of 'unlocked', 'locked', or 'published'.), parameter "metadata" of original type "usermeta" (User provided metadata about an object. Arbitrary key-value pairs provided by the user.) → mapping from String to String + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public Tuple9> createWorkspace(CreateWorkspaceParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(params); + TypeReference>>> retType = new TypeReference>>>() {}; + List>> res = caller.jsonrpcCall("Workspace.create_workspace", args, retType, true, true, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: alter_workspace_metadata

+ *
+     * Change the metadata associated with a workspace.
+     * 
+ * @param params instance of type {@link us.kbase.workspace.AlterWorkspaceMetadataParams AlterWorkspaceMetadataParams} + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public void alterWorkspaceMetadata(AlterWorkspaceMetadataParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(params); + TypeReference retType = new TypeReference() {}; + caller.jsonrpcCall("Workspace.alter_workspace_metadata", args, retType, false, true, jsonRpcContext, this.serviceVersion); + } + + /** + *

Original spec-file function name: clone_workspace

+ *
+     * Clones a workspace.
+     * 
+ * @param params instance of type {@link us.kbase.workspace.CloneWorkspaceParams CloneWorkspaceParams} + * @return parameter "info" of original type "workspace_info" (Information about a workspace. ws_id id - the numerical ID of the workspace. ws_name workspace - name of the workspace. username owner - name of the user who owns (e.g. created) this workspace. timestamp moddate - date when the workspace was last modified. int max_objid - the maximum object ID appearing in this workspace. Since cloning a workspace preserves object IDs, this number may be greater than the number of objects in a newly cloned workspace. permission user_permission - permissions for the authenticated user of this workspace. permission globalread - whether this workspace is globally readable. lock_status lockstat - the status of the workspace lock. usermeta metadata - arbitrary user-supplied metadata about the workspace.) → tuple of size 9: parameter "id" of original type "ws_id" (The unique, permanent numerical ID of a workspace.), parameter "workspace" of original type "ws_name" (A string used as a name for a workspace. Any string consisting of alphanumeric characters and "_", ".", or "-" that is not an integer is acceptable. The name may optionally be prefixed with the workspace owner's user name and a colon, e.g. kbasetest:my_workspace.), parameter "owner" of original type "username" (Login name of a KBase user account.), parameter "moddate" of original type "timestamp" (A time in the format YYYY-MM-DDThh:mm:ssZ, where Z is either the character Z (representing the UTC timezone) or the difference in time to UTC in the format +/-HHMM, eg: 2012-12-17T23:24:06-0500 (EST time) 2013-04-03T08:56:32+0000 (UTC time) 2013-04-03T08:56:32Z (UTC time)), parameter "max_objid" of Long, parameter "user_permission" of original type "permission" (Represents the permissions a user or users have to a workspace: 'a' - administrator. All operations allowed. 'w' - read/write. 'r' - read. 'n' - no permissions.), parameter "globalread" of original type "permission" (Represents the permissions a user or users have to a workspace: 'a' - administrator. All operations allowed. 'w' - read/write. 'r' - read. 'n' - no permissions.), parameter "lockstat" of original type "lock_status" (The lock status of a workspace. One of 'unlocked', 'locked', or 'published'.), parameter "metadata" of original type "usermeta" (User provided metadata about an object. Arbitrary key-value pairs provided by the user.) → mapping from String to String + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public Tuple9> cloneWorkspace(CloneWorkspaceParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(params); + TypeReference>>> retType = new TypeReference>>>() {}; + List>> res = caller.jsonrpcCall("Workspace.clone_workspace", args, retType, true, true, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: lock_workspace

+ *
+     * Lock a workspace, preventing further changes.
+     *                 WARNING: Locking a workspace is permanent. A workspace, once locked,
+     *                 cannot be unlocked.
+     *                 The only changes allowed for a locked workspace are changing user
+     *                 based permissions or making a private workspace globally readable,
+     *                 thus permanently publishing the workspace. A locked, globally readable
+     *                 workspace cannot be made private.
+     * 
+ * @param wsi instance of type {@link us.kbase.workspace.WorkspaceIdentity WorkspaceIdentity} + * @return parameter "info" of original type "workspace_info" (Information about a workspace. ws_id id - the numerical ID of the workspace. ws_name workspace - name of the workspace. username owner - name of the user who owns (e.g. created) this workspace. timestamp moddate - date when the workspace was last modified. int max_objid - the maximum object ID appearing in this workspace. Since cloning a workspace preserves object IDs, this number may be greater than the number of objects in a newly cloned workspace. permission user_permission - permissions for the authenticated user of this workspace. permission globalread - whether this workspace is globally readable. lock_status lockstat - the status of the workspace lock. usermeta metadata - arbitrary user-supplied metadata about the workspace.) → tuple of size 9: parameter "id" of original type "ws_id" (The unique, permanent numerical ID of a workspace.), parameter "workspace" of original type "ws_name" (A string used as a name for a workspace. Any string consisting of alphanumeric characters and "_", ".", or "-" that is not an integer is acceptable. The name may optionally be prefixed with the workspace owner's user name and a colon, e.g. kbasetest:my_workspace.), parameter "owner" of original type "username" (Login name of a KBase user account.), parameter "moddate" of original type "timestamp" (A time in the format YYYY-MM-DDThh:mm:ssZ, where Z is either the character Z (representing the UTC timezone) or the difference in time to UTC in the format +/-HHMM, eg: 2012-12-17T23:24:06-0500 (EST time) 2013-04-03T08:56:32+0000 (UTC time) 2013-04-03T08:56:32Z (UTC time)), parameter "max_objid" of Long, parameter "user_permission" of original type "permission" (Represents the permissions a user or users have to a workspace: 'a' - administrator. All operations allowed. 'w' - read/write. 'r' - read. 'n' - no permissions.), parameter "globalread" of original type "permission" (Represents the permissions a user or users have to a workspace: 'a' - administrator. All operations allowed. 'w' - read/write. 'r' - read. 'n' - no permissions.), parameter "lockstat" of original type "lock_status" (The lock status of a workspace. One of 'unlocked', 'locked', or 'published'.), parameter "metadata" of original type "usermeta" (User provided metadata about an object. Arbitrary key-value pairs provided by the user.) → mapping from String to String + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public Tuple9> lockWorkspace(WorkspaceIdentity wsi, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(wsi); + TypeReference>>> retType = new TypeReference>>>() {}; + List>> res = caller.jsonrpcCall("Workspace.lock_workspace", args, retType, true, true, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: get_workspacemeta

+ *
+     * Retrieves the metadata associated with the specified workspace.
+     * Provided for backwards compatibility.
+     * @deprecated Workspace.get_workspace_info
+     * 
+ * @param params instance of type {@link us.kbase.workspace.GetWorkspacemetaParams GetWorkspacemetaParams} (original type "get_workspacemeta_params") + * @return parameter "metadata" of original type "workspace_metadata" (Meta data associated with a workspace. Provided for backwards compatibility. To be replaced by workspace_info. ws_name id - name of the workspace username owner - name of the user who owns (who created) this workspace timestamp moddate - date when the workspace was last modified int objects - the approximate number of objects currently stored in the workspace. permission user_permission - permissions for the currently logged in user for the workspace permission global_permission - default permissions for the workspace for all KBase users ws_id num_id - numerical ID of the workspace @deprecated Workspace.workspace_info) → tuple of size 7: parameter "id" of original type "ws_name" (A string used as a name for a workspace. Any string consisting of alphanumeric characters and "_", ".", or "-" that is not an integer is acceptable. The name may optionally be prefixed with the workspace owner's user name and a colon, e.g. kbasetest:my_workspace.), parameter "owner" of original type "username" (Login name of a KBase user account.), parameter "moddate" of original type "timestamp" (A time in the format YYYY-MM-DDThh:mm:ssZ, where Z is either the character Z (representing the UTC timezone) or the difference in time to UTC in the format +/-HHMM, eg: 2012-12-17T23:24:06-0500 (EST time) 2013-04-03T08:56:32+0000 (UTC time) 2013-04-03T08:56:32Z (UTC time)), parameter "objects" of Long, parameter "user_permission" of original type "permission" (Represents the permissions a user or users have to a workspace: 'a' - administrator. All operations allowed. 'w' - read/write. 'r' - read. 'n' - no permissions.), parameter "global_permission" of original type "permission" (Represents the permissions a user or users have to a workspace: 'a' - administrator. All operations allowed. 'w' - read/write. 'r' - read. 'n' - no permissions.), parameter "num_id" of original type "ws_id" (The unique, permanent numerical ID of a workspace.) + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public Tuple7 getWorkspacemeta(GetWorkspacemetaParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(params); + TypeReference>> retType = new TypeReference>>() {}; + List> res = caller.jsonrpcCall("Workspace.get_workspacemeta", args, retType, true, false, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: get_workspace_info

+ *
+     * Get information associated with a workspace.
+     * 
+ * @param wsi instance of type {@link us.kbase.workspace.WorkspaceIdentity WorkspaceIdentity} + * @return parameter "info" of original type "workspace_info" (Information about a workspace. ws_id id - the numerical ID of the workspace. ws_name workspace - name of the workspace. username owner - name of the user who owns (e.g. created) this workspace. timestamp moddate - date when the workspace was last modified. int max_objid - the maximum object ID appearing in this workspace. Since cloning a workspace preserves object IDs, this number may be greater than the number of objects in a newly cloned workspace. permission user_permission - permissions for the authenticated user of this workspace. permission globalread - whether this workspace is globally readable. lock_status lockstat - the status of the workspace lock. usermeta metadata - arbitrary user-supplied metadata about the workspace.) → tuple of size 9: parameter "id" of original type "ws_id" (The unique, permanent numerical ID of a workspace.), parameter "workspace" of original type "ws_name" (A string used as a name for a workspace. Any string consisting of alphanumeric characters and "_", ".", or "-" that is not an integer is acceptable. The name may optionally be prefixed with the workspace owner's user name and a colon, e.g. kbasetest:my_workspace.), parameter "owner" of original type "username" (Login name of a KBase user account.), parameter "moddate" of original type "timestamp" (A time in the format YYYY-MM-DDThh:mm:ssZ, where Z is either the character Z (representing the UTC timezone) or the difference in time to UTC in the format +/-HHMM, eg: 2012-12-17T23:24:06-0500 (EST time) 2013-04-03T08:56:32+0000 (UTC time) 2013-04-03T08:56:32Z (UTC time)), parameter "max_objid" of Long, parameter "user_permission" of original type "permission" (Represents the permissions a user or users have to a workspace: 'a' - administrator. All operations allowed. 'w' - read/write. 'r' - read. 'n' - no permissions.), parameter "globalread" of original type "permission" (Represents the permissions a user or users have to a workspace: 'a' - administrator. All operations allowed. 'w' - read/write. 'r' - read. 'n' - no permissions.), parameter "lockstat" of original type "lock_status" (The lock status of a workspace. One of 'unlocked', 'locked', or 'published'.), parameter "metadata" of original type "usermeta" (User provided metadata about an object. Arbitrary key-value pairs provided by the user.) → mapping from String to String + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public Tuple9> getWorkspaceInfo(WorkspaceIdentity wsi, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(wsi); + TypeReference>>> retType = new TypeReference>>>() {}; + List>> res = caller.jsonrpcCall("Workspace.get_workspace_info", args, retType, true, false, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: get_workspace_description

+ *
+     * Get a workspace's description.
+     * 
+ * @param wsi instance of type {@link us.kbase.workspace.WorkspaceIdentity WorkspaceIdentity} + * @return parameter "description" of String + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public String getWorkspaceDescription(WorkspaceIdentity wsi, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(wsi); + TypeReference> retType = new TypeReference>() {}; + List res = caller.jsonrpcCall("Workspace.get_workspace_description", args, retType, true, false, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: set_permissions

+ *
+     * Set permissions for a workspace.
+     * 
+ * @param params instance of type {@link us.kbase.workspace.SetPermissionsParams SetPermissionsParams} + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public void setPermissions(SetPermissionsParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(params); + TypeReference retType = new TypeReference() {}; + caller.jsonrpcCall("Workspace.set_permissions", args, retType, false, true, jsonRpcContext, this.serviceVersion); + } + + /** + *

Original spec-file function name: set_global_permission

+ *
+     * Set the global permission for a workspace.
+     * 
+ * @param params instance of type {@link us.kbase.workspace.SetGlobalPermissionsParams SetGlobalPermissionsParams} + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public void setGlobalPermission(SetGlobalPermissionsParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(params); + TypeReference retType = new TypeReference() {}; + caller.jsonrpcCall("Workspace.set_global_permission", args, retType, false, true, jsonRpcContext, this.serviceVersion); + } + + /** + *

Original spec-file function name: set_workspace_description

+ *
+     * Set the description for a workspace.
+     * 
+ * @param params instance of type {@link us.kbase.workspace.SetWorkspaceDescriptionParams SetWorkspaceDescriptionParams} + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public void setWorkspaceDescription(SetWorkspaceDescriptionParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(params); + TypeReference retType = new TypeReference() {}; + caller.jsonrpcCall("Workspace.set_workspace_description", args, retType, false, true, jsonRpcContext, this.serviceVersion); + } + + /** + *

Original spec-file function name: get_permissions_mass

+ *
+     * Get permissions for multiple workspaces.
+     * 
+ * @param mass instance of type {@link us.kbase.workspace.GetPermissionsMassParams GetPermissionsMassParams} + * @return parameter "perms" of type {@link us.kbase.workspace.WorkspacePermissions WorkspacePermissions} + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public WorkspacePermissions getPermissionsMass(GetPermissionsMassParams mass, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(mass); + TypeReference> retType = new TypeReference>() {}; + List res = caller.jsonrpcCall("Workspace.get_permissions_mass", args, retType, true, false, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: get_permissions

+ *
+     * Get permissions for a workspace.
+     * @deprecated get_permissions_mass
+     * 
+ * @param wsi instance of type {@link us.kbase.workspace.WorkspaceIdentity WorkspaceIdentity} + * @return parameter "perms" of mapping from original type "username" (Login name of a KBase user account.) to original type "permission" (Represents the permissions a user or users have to a workspace: 'a' - administrator. All operations allowed. 'w' - read/write. 'r' - read. 'n' - no permissions.) + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public Map getPermissions(WorkspaceIdentity wsi, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(wsi); + TypeReference>> retType = new TypeReference>>() {}; + List> res = caller.jsonrpcCall("Workspace.get_permissions", args, retType, true, false, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: save_object

+ *
+     * Saves the input object data and metadata into the selected workspace,
+     *         returning the object_metadata of the saved object. Provided
+     *         for backwards compatibility.
+     * @deprecated Workspace.save_objects
+     * 
+ * @param params instance of type {@link us.kbase.workspace.SaveObjectParams SaveObjectParams} (original type "save_object_params") + * @return parameter "metadata" of original type "object_metadata" (Meta data associated with an object stored in a workspace. Provided for backwards compatibility. obj_name id - name of the object. type_string type - type of the object. timestamp moddate - date when the object was saved obj_ver instance - the version of the object string command - Deprecated. Always returns the empty string. username lastmodifier - name of the user who last saved the object, including copying the object username owner - Deprecated. Same as lastmodifier. ws_name workspace - name of the workspace in which the object is stored string ref - Deprecated. Always returns the empty string. string chsum - the md5 checksum of the object. usermeta metadata - arbitrary user-supplied metadata about the object. obj_id objid - the numerical id of the object. @deprecated object_info) → tuple of size 12: parameter "id" of original type "obj_name" (A string used as a name for an object. Any string consisting of alphanumeric characters and the characters |._- that is not an integer is acceptable.), parameter "type" of original type "type_string" (A type string. Specifies the type and its version in a single string in the format [module].[typename]-[major].[minor]: module - a string. The module name of the typespec containing the type. typename - a string. The name of the type as assigned by the typedef statement. major - an integer. The major version of the type. A change in the major version implies the type has changed in a non-backwards compatible way. minor - an integer. The minor version of the type. A change in the minor version implies that the type has changed in a way that is backwards compatible with previous type definitions. In many cases, the major and minor versions are optional, and if not provided the most recent version will be used. Example: MyModule.MyType-3.1), parameter "moddate" of original type "timestamp" (A time in the format YYYY-MM-DDThh:mm:ssZ, where Z is either the character Z (representing the UTC timezone) or the difference in time to UTC in the format +/-HHMM, eg: 2012-12-17T23:24:06-0500 (EST time) 2013-04-03T08:56:32+0000 (UTC time) 2013-04-03T08:56:32Z (UTC time)), parameter "instance" of Long, parameter "command" of String, parameter "lastmodifier" of original type "username" (Login name of a KBase user account.), parameter "owner" of original type "username" (Login name of a KBase user account.), parameter "workspace" of original type "ws_name" (A string used as a name for a workspace. Any string consisting of alphanumeric characters and "_", ".", or "-" that is not an integer is acceptable. The name may optionally be prefixed with the workspace owner's user name and a colon, e.g. kbasetest:my_workspace.), parameter "ref" of String, parameter "chsum" of String, parameter "metadata" of original type "usermeta" (User provided metadata about an object. Arbitrary key-value pairs provided by the user.) → mapping from String to String, parameter "objid" of original type "obj_id" (The unique, permanent numerical ID of an object.) + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public Tuple12, Long> saveObject(SaveObjectParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(params); + TypeReference, Long>>> retType = new TypeReference, Long>>>() {}; + List, Long>> res = caller.jsonrpcCall("Workspace.save_object", args, retType, true, false, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: save_objects

+ *
+     * Save objects to the workspace. Saving over a deleted object undeletes
+     * it.
+     * 
+ * @param params instance of type {@link us.kbase.workspace.SaveObjectsParams SaveObjectsParams} + * @return parameter "info" of list of original type "object_info" (Information about an object, including user provided metadata. obj_id objid - the numerical id of the object. obj_name name - the name of the object. type_string type - the type of the object. timestamp save_date - the save date of the object. obj_ver ver - the version of the object. username saved_by - the user that saved or copied the object. ws_id wsid - the workspace containing the object. ws_name workspace - the workspace containing the object. string chsum - the md5 checksum of the object. int size - the size of the object in bytes. usermeta meta - arbitrary user-supplied metadata about the object.) → tuple of size 11: parameter "objid" of original type "obj_id" (The unique, permanent numerical ID of an object.), parameter "name" of original type "obj_name" (A string used as a name for an object. Any string consisting of alphanumeric characters and the characters |._- that is not an integer is acceptable.), parameter "type" of original type "type_string" (A type string. Specifies the type and its version in a single string in the format [module].[typename]-[major].[minor]: module - a string. The module name of the typespec containing the type. typename - a string. The name of the type as assigned by the typedef statement. major - an integer. The major version of the type. A change in the major version implies the type has changed in a non-backwards compatible way. minor - an integer. The minor version of the type. A change in the minor version implies that the type has changed in a way that is backwards compatible with previous type definitions. In many cases, the major and minor versions are optional, and if not provided the most recent version will be used. Example: MyModule.MyType-3.1), parameter "save_date" of original type "timestamp" (A time in the format YYYY-MM-DDThh:mm:ssZ, where Z is either the character Z (representing the UTC timezone) or the difference in time to UTC in the format +/-HHMM, eg: 2012-12-17T23:24:06-0500 (EST time) 2013-04-03T08:56:32+0000 (UTC time) 2013-04-03T08:56:32Z (UTC time)), parameter "version" of Long, parameter "saved_by" of original type "username" (Login name of a KBase user account.), parameter "wsid" of original type "ws_id" (The unique, permanent numerical ID of a workspace.), parameter "workspace" of original type "ws_name" (A string used as a name for a workspace. Any string consisting of alphanumeric characters and "_", ".", or "-" that is not an integer is acceptable. The name may optionally be prefixed with the workspace owner's user name and a colon, e.g. kbasetest:my_workspace.), parameter "chsum" of String, parameter "size" of Long, parameter "meta" of original type "usermeta" (User provided metadata about an object. Arbitrary key-value pairs provided by the user.) → mapping from String to String + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public List>> saveObjects(SaveObjectsParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(params); + TypeReference>>>> retType = new TypeReference>>>>() {}; + List>>> res = caller.jsonrpcCall("Workspace.save_objects", args, retType, true, true, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: get_object

+ *
+     * Retrieves the specified object from the specified workspace.
+     * Both the object data and metadata are returned.
+     * Provided for backwards compatibility.
+     * @deprecated Workspace.get_objects
+     * 
+ * @param params instance of type {@link us.kbase.workspace.GetObjectParams GetObjectParams} (original type "get_object_params") + * @return parameter "output" of type {@link us.kbase.workspace.GetObjectOutput GetObjectOutput} (original type "get_object_output") + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public GetObjectOutput getObject(GetObjectParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(params); + TypeReference> retType = new TypeReference>() {}; + List res = caller.jsonrpcCall("Workspace.get_object", args, retType, true, false, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: get_object_provenance

+ *
+     * DEPRECATED
+     * Get object provenance from the workspace.
+     * @deprecated Workspace.get_objects2
+     * 
+ * @param objectIds instance of list of type {@link us.kbase.workspace.ObjectIdentity ObjectIdentity} + * @return parameter "data" of list of type {@link us.kbase.workspace.ObjectProvenanceInfo ObjectProvenanceInfo} + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public List getObjectProvenance(List objectIds, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(objectIds); + TypeReference>> retType = new TypeReference>>() {}; + List> res = caller.jsonrpcCall("Workspace.get_object_provenance", args, retType, true, false, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: get_objects

+ *
+     * DEPRECATED
+     * Get objects from the workspace.
+     * @deprecated Workspace.get_objects2
+     * 
+ * @param objectIds instance of list of type {@link us.kbase.workspace.ObjectIdentity ObjectIdentity} + * @return parameter "data" of list of type {@link us.kbase.workspace.ObjectData ObjectData} + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public List getObjects(List objectIds, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(objectIds); + TypeReference>> retType = new TypeReference>>() {}; + List> res = caller.jsonrpcCall("Workspace.get_objects", args, retType, true, false, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: get_objects2

+ *
+     * Get objects from the workspace.
+     * 
+ * @param params instance of type {@link us.kbase.workspace.GetObjects2Params GetObjects2Params} + * @return parameter "results" of type {@link us.kbase.workspace.GetObjects2Results GetObjects2Results} + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public GetObjects2Results getObjects2(GetObjects2Params params, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(params); + TypeReference> retType = new TypeReference>() {}; + List res = caller.jsonrpcCall("Workspace.get_objects2", args, retType, true, false, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: get_object_subset

+ *
+     * DEPRECATED
+     * Get portions of objects from the workspace.
+     * When selecting a subset of an array in an object, the returned
+     * array is compressed to the size of the subset, but the ordering of
+     * the array is maintained. For example, if the array stored at the
+     * 'feature' key of a Genome object has 4000 entries, and the object paths
+     * provided are:
+     *         /feature/7
+     *         /feature/3015
+     *         /feature/700
+     * The returned feature array will be of length three and the entries will
+     * consist, in order, of the 7th, 700th, and 3015th entries of the
+     * original array.
+     * @deprecated Workspace.get_objects2
+     * 
+ * @param subObjectIds instance of list of type {@link us.kbase.workspace.SubObjectIdentity SubObjectIdentity} + * @return parameter "data" of list of type {@link us.kbase.workspace.ObjectData ObjectData} + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public List getObjectSubset(List subObjectIds, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(subObjectIds); + TypeReference>> retType = new TypeReference>>() {}; + List> res = caller.jsonrpcCall("Workspace.get_object_subset", args, retType, true, false, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: get_object_history

+ *
+     * Get an object's history. The version argument of the ObjectIdentity is
+     * ignored.
+     * 
+ * @param object instance of type {@link us.kbase.workspace.ObjectIdentity ObjectIdentity} + * @return parameter "history" of list of original type "object_info" (Information about an object, including user provided metadata. obj_id objid - the numerical id of the object. obj_name name - the name of the object. type_string type - the type of the object. timestamp save_date - the save date of the object. obj_ver ver - the version of the object. username saved_by - the user that saved or copied the object. ws_id wsid - the workspace containing the object. ws_name workspace - the workspace containing the object. string chsum - the md5 checksum of the object. int size - the size of the object in bytes. usermeta meta - arbitrary user-supplied metadata about the object.) → tuple of size 11: parameter "objid" of original type "obj_id" (The unique, permanent numerical ID of an object.), parameter "name" of original type "obj_name" (A string used as a name for an object. Any string consisting of alphanumeric characters and the characters |._- that is not an integer is acceptable.), parameter "type" of original type "type_string" (A type string. Specifies the type and its version in a single string in the format [module].[typename]-[major].[minor]: module - a string. The module name of the typespec containing the type. typename - a string. The name of the type as assigned by the typedef statement. major - an integer. The major version of the type. A change in the major version implies the type has changed in a non-backwards compatible way. minor - an integer. The minor version of the type. A change in the minor version implies that the type has changed in a way that is backwards compatible with previous type definitions. In many cases, the major and minor versions are optional, and if not provided the most recent version will be used. Example: MyModule.MyType-3.1), parameter "save_date" of original type "timestamp" (A time in the format YYYY-MM-DDThh:mm:ssZ, where Z is either the character Z (representing the UTC timezone) or the difference in time to UTC in the format +/-HHMM, eg: 2012-12-17T23:24:06-0500 (EST time) 2013-04-03T08:56:32+0000 (UTC time) 2013-04-03T08:56:32Z (UTC time)), parameter "version" of Long, parameter "saved_by" of original type "username" (Login name of a KBase user account.), parameter "wsid" of original type "ws_id" (The unique, permanent numerical ID of a workspace.), parameter "workspace" of original type "ws_name" (A string used as a name for a workspace. Any string consisting of alphanumeric characters and "_", ".", or "-" that is not an integer is acceptable. The name may optionally be prefixed with the workspace owner's user name and a colon, e.g. kbasetest:my_workspace.), parameter "chsum" of String, parameter "size" of Long, parameter "meta" of original type "usermeta" (User provided metadata about an object. Arbitrary key-value pairs provided by the user.) → mapping from String to String + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public List>> getObjectHistory(ObjectIdentity object, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(object); + TypeReference>>>> retType = new TypeReference>>>>() {}; + List>>> res = caller.jsonrpcCall("Workspace.get_object_history", args, retType, true, false, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: list_referencing_objects

+ *
+     * List objects that reference one or more specified objects. References
+     * in the deleted state are not returned.
+     * 
+ * @param objectIds instance of list of type {@link us.kbase.workspace.ObjectIdentity ObjectIdentity} + * @return parameter "referrers" of list of list of original type "object_info" (Information about an object, including user provided metadata. obj_id objid - the numerical id of the object. obj_name name - the name of the object. type_string type - the type of the object. timestamp save_date - the save date of the object. obj_ver ver - the version of the object. username saved_by - the user that saved or copied the object. ws_id wsid - the workspace containing the object. ws_name workspace - the workspace containing the object. string chsum - the md5 checksum of the object. int size - the size of the object in bytes. usermeta meta - arbitrary user-supplied metadata about the object.) → tuple of size 11: parameter "objid" of original type "obj_id" (The unique, permanent numerical ID of an object.), parameter "name" of original type "obj_name" (A string used as a name for an object. Any string consisting of alphanumeric characters and the characters |._- that is not an integer is acceptable.), parameter "type" of original type "type_string" (A type string. Specifies the type and its version in a single string in the format [module].[typename]-[major].[minor]: module - a string. The module name of the typespec containing the type. typename - a string. The name of the type as assigned by the typedef statement. major - an integer. The major version of the type. A change in the major version implies the type has changed in a non-backwards compatible way. minor - an integer. The minor version of the type. A change in the minor version implies that the type has changed in a way that is backwards compatible with previous type definitions. In many cases, the major and minor versions are optional, and if not provided the most recent version will be used. Example: MyModule.MyType-3.1), parameter "save_date" of original type "timestamp" (A time in the format YYYY-MM-DDThh:mm:ssZ, where Z is either the character Z (representing the UTC timezone) or the difference in time to UTC in the format +/-HHMM, eg: 2012-12-17T23:24:06-0500 (EST time) 2013-04-03T08:56:32+0000 (UTC time) 2013-04-03T08:56:32Z (UTC time)), parameter "version" of Long, parameter "saved_by" of original type "username" (Login name of a KBase user account.), parameter "wsid" of original type "ws_id" (The unique, permanent numerical ID of a workspace.), parameter "workspace" of original type "ws_name" (A string used as a name for a workspace. Any string consisting of alphanumeric characters and "_", ".", or "-" that is not an integer is acceptable. The name may optionally be prefixed with the workspace owner's user name and a colon, e.g. kbasetest:my_workspace.), parameter "chsum" of String, parameter "size" of Long, parameter "meta" of original type "usermeta" (User provided metadata about an object. Arbitrary key-value pairs provided by the user.) → mapping from String to String + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public List>>> listReferencingObjects(List objectIds, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(objectIds); + TypeReference>>>>> retType = new TypeReference>>>>>() {}; + List>>>> res = caller.jsonrpcCall("Workspace.list_referencing_objects", args, retType, true, false, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: list_referencing_object_counts

+ *
+     * DEPRECATED
+     * List the number of times objects have been referenced.
+     * This count includes both provenance and object-to-object references
+     * and, unlike list_referencing_objects, includes objects that are
+     * inaccessible to the user.
+     * @deprecated
+     * 
+ * @param objectIds instance of list of type {@link us.kbase.workspace.ObjectIdentity ObjectIdentity} + * @return parameter "counts" of list of Long + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public List listReferencingObjectCounts(List objectIds, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(objectIds); + TypeReference>> retType = new TypeReference>>() {}; + List> res = caller.jsonrpcCall("Workspace.list_referencing_object_counts", args, retType, true, false, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: get_referenced_objects

+ *
+     * DEPRECATED
+     *                 Get objects by references from other objects.
+     *                 NOTE: In the vast majority of cases, this method is not necessary and
+     *                 get_objects should be used instead.
+     *                 get_referenced_objects guarantees that a user that has access to an
+     *                 object can always see a) objects that are referenced inside the object
+     *                 and b) objects that are referenced in the object's provenance. This
+     *                 ensures that the user has visibility into the entire provenance of the
+     *                 object and the object's object dependencies (e.g. references).
+     *                 The user must have at least read access to the first object in each
+     *                 reference chain, but need not have access to any further objects in
+     *                 the chain, and those objects may be deleted.
+     *                 @deprecated Workspace.get_objects2
+     * 
+ * @param refChains instance of list of original type "ref_chain" (A chain of objects with references to one another. An object reference chain consists of a list of objects where the nth object possesses a reference, either in the object itself or in the object provenance, to the n+1th object.) → list of type {@link us.kbase.workspace.ObjectIdentity ObjectIdentity} + * @return parameter "data" of list of type {@link us.kbase.workspace.ObjectData ObjectData} + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public List getReferencedObjects(List> refChains, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(refChains); + TypeReference>> retType = new TypeReference>>() {}; + List> res = caller.jsonrpcCall("Workspace.get_referenced_objects", args, retType, true, false, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: list_workspaces

+ *
+     * Lists the metadata of all workspaces a user has access to. Provided for
+     * backwards compatibility - to be replaced by the functionality of
+     * list_workspace_info
+     * @deprecated Workspace.list_workspace_info
+     * 
+ * @param params instance of type {@link us.kbase.workspace.ListWorkspacesParams ListWorkspacesParams} (original type "list_workspaces_params") + * @return parameter "workspaces" of list of original type "workspace_metadata" (Meta data associated with a workspace. Provided for backwards compatibility. To be replaced by workspace_info. ws_name id - name of the workspace username owner - name of the user who owns (who created) this workspace timestamp moddate - date when the workspace was last modified int objects - the approximate number of objects currently stored in the workspace. permission user_permission - permissions for the currently logged in user for the workspace permission global_permission - default permissions for the workspace for all KBase users ws_id num_id - numerical ID of the workspace @deprecated Workspace.workspace_info) → tuple of size 7: parameter "id" of original type "ws_name" (A string used as a name for a workspace. Any string consisting of alphanumeric characters and "_", ".", or "-" that is not an integer is acceptable. The name may optionally be prefixed with the workspace owner's user name and a colon, e.g. kbasetest:my_workspace.), parameter "owner" of original type "username" (Login name of a KBase user account.), parameter "moddate" of original type "timestamp" (A time in the format YYYY-MM-DDThh:mm:ssZ, where Z is either the character Z (representing the UTC timezone) or the difference in time to UTC in the format +/-HHMM, eg: 2012-12-17T23:24:06-0500 (EST time) 2013-04-03T08:56:32+0000 (UTC time) 2013-04-03T08:56:32Z (UTC time)), parameter "objects" of Long, parameter "user_permission" of original type "permission" (Represents the permissions a user or users have to a workspace: 'a' - administrator. All operations allowed. 'w' - read/write. 'r' - read. 'n' - no permissions.), parameter "global_permission" of original type "permission" (Represents the permissions a user or users have to a workspace: 'a' - administrator. All operations allowed. 'w' - read/write. 'r' - read. 'n' - no permissions.), parameter "num_id" of original type "ws_id" (The unique, permanent numerical ID of a workspace.) + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public List> listWorkspaces(ListWorkspacesParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(params); + TypeReference>>> retType = new TypeReference>>>() {}; + List>> res = caller.jsonrpcCall("Workspace.list_workspaces", args, retType, true, false, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: list_workspace_info

+ *
+     * List workspaces viewable by the user.
+     * 
+ * @param params instance of type {@link us.kbase.workspace.ListWorkspaceInfoParams ListWorkspaceInfoParams} + * @return parameter "wsinfo" of list of original type "workspace_info" (Information about a workspace. ws_id id - the numerical ID of the workspace. ws_name workspace - name of the workspace. username owner - name of the user who owns (e.g. created) this workspace. timestamp moddate - date when the workspace was last modified. int max_objid - the maximum object ID appearing in this workspace. Since cloning a workspace preserves object IDs, this number may be greater than the number of objects in a newly cloned workspace. permission user_permission - permissions for the authenticated user of this workspace. permission globalread - whether this workspace is globally readable. lock_status lockstat - the status of the workspace lock. usermeta metadata - arbitrary user-supplied metadata about the workspace.) → tuple of size 9: parameter "id" of original type "ws_id" (The unique, permanent numerical ID of a workspace.), parameter "workspace" of original type "ws_name" (A string used as a name for a workspace. Any string consisting of alphanumeric characters and "_", ".", or "-" that is not an integer is acceptable. The name may optionally be prefixed with the workspace owner's user name and a colon, e.g. kbasetest:my_workspace.), parameter "owner" of original type "username" (Login name of a KBase user account.), parameter "moddate" of original type "timestamp" (A time in the format YYYY-MM-DDThh:mm:ssZ, where Z is either the character Z (representing the UTC timezone) or the difference in time to UTC in the format +/-HHMM, eg: 2012-12-17T23:24:06-0500 (EST time) 2013-04-03T08:56:32+0000 (UTC time) 2013-04-03T08:56:32Z (UTC time)), parameter "max_objid" of Long, parameter "user_permission" of original type "permission" (Represents the permissions a user or users have to a workspace: 'a' - administrator. All operations allowed. 'w' - read/write. 'r' - read. 'n' - no permissions.), parameter "globalread" of original type "permission" (Represents the permissions a user or users have to a workspace: 'a' - administrator. All operations allowed. 'w' - read/write. 'r' - read. 'n' - no permissions.), parameter "lockstat" of original type "lock_status" (The lock status of a workspace. One of 'unlocked', 'locked', or 'published'.), parameter "metadata" of original type "usermeta" (User provided metadata about an object. Arbitrary key-value pairs provided by the user.) → mapping from String to String + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public List>> listWorkspaceInfo(ListWorkspaceInfoParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(params); + TypeReference>>>> retType = new TypeReference>>>>() {}; + List>>> res = caller.jsonrpcCall("Workspace.list_workspace_info", args, retType, true, false, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: list_workspace_ids

+ *
+     * List workspace IDs to which the user has access.
+     * This function returns a subset of the information in the
+     * list_workspace_info method and should be substantially faster.
+     * 
+ * @param params instance of type {@link us.kbase.workspace.ListWorkspaceIDsParams ListWorkspaceIDsParams} + * @return parameter "results" of type {@link us.kbase.workspace.ListWorkspaceIDsResults ListWorkspaceIDsResults} + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public ListWorkspaceIDsResults listWorkspaceIds(ListWorkspaceIDsParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(params); + TypeReference> retType = new TypeReference>() {}; + List res = caller.jsonrpcCall("Workspace.list_workspace_ids", args, retType, true, false, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: list_workspace_objects

+ *
+     * Lists the metadata of all objects in the specified workspace with the
+     * specified type (or with any type). Provided for backwards compatibility.
+     * @deprecated Workspace.list_objects
+     * 
+ * @param params instance of type {@link us.kbase.workspace.ListWorkspaceObjectsParams ListWorkspaceObjectsParams} (original type "list_workspace_objects_params") + * @return parameter "objects" of list of original type "object_metadata" (Meta data associated with an object stored in a workspace. Provided for backwards compatibility. obj_name id - name of the object. type_string type - type of the object. timestamp moddate - date when the object was saved obj_ver instance - the version of the object string command - Deprecated. Always returns the empty string. username lastmodifier - name of the user who last saved the object, including copying the object username owner - Deprecated. Same as lastmodifier. ws_name workspace - name of the workspace in which the object is stored string ref - Deprecated. Always returns the empty string. string chsum - the md5 checksum of the object. usermeta metadata - arbitrary user-supplied metadata about the object. obj_id objid - the numerical id of the object. @deprecated object_info) → tuple of size 12: parameter "id" of original type "obj_name" (A string used as a name for an object. Any string consisting of alphanumeric characters and the characters |._- that is not an integer is acceptable.), parameter "type" of original type "type_string" (A type string. Specifies the type and its version in a single string in the format [module].[typename]-[major].[minor]: module - a string. The module name of the typespec containing the type. typename - a string. The name of the type as assigned by the typedef statement. major - an integer. The major version of the type. A change in the major version implies the type has changed in a non-backwards compatible way. minor - an integer. The minor version of the type. A change in the minor version implies that the type has changed in a way that is backwards compatible with previous type definitions. In many cases, the major and minor versions are optional, and if not provided the most recent version will be used. Example: MyModule.MyType-3.1), parameter "moddate" of original type "timestamp" (A time in the format YYYY-MM-DDThh:mm:ssZ, where Z is either the character Z (representing the UTC timezone) or the difference in time to UTC in the format +/-HHMM, eg: 2012-12-17T23:24:06-0500 (EST time) 2013-04-03T08:56:32+0000 (UTC time) 2013-04-03T08:56:32Z (UTC time)), parameter "instance" of Long, parameter "command" of String, parameter "lastmodifier" of original type "username" (Login name of a KBase user account.), parameter "owner" of original type "username" (Login name of a KBase user account.), parameter "workspace" of original type "ws_name" (A string used as a name for a workspace. Any string consisting of alphanumeric characters and "_", ".", or "-" that is not an integer is acceptable. The name may optionally be prefixed with the workspace owner's user name and a colon, e.g. kbasetest:my_workspace.), parameter "ref" of String, parameter "chsum" of String, parameter "metadata" of original type "usermeta" (User provided metadata about an object. Arbitrary key-value pairs provided by the user.) → mapping from String to String, parameter "objid" of original type "obj_id" (The unique, permanent numerical ID of an object.) + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public List, Long>> listWorkspaceObjects(ListWorkspaceObjectsParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(params); + TypeReference, Long>>>> retType = new TypeReference, Long>>>>() {}; + List, Long>>> res = caller.jsonrpcCall("Workspace.list_workspace_objects", args, retType, true, false, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: list_objects

+ *
+     * List objects in one or more workspaces.
+     * 
+ * @param params instance of type {@link us.kbase.workspace.ListObjectsParams ListObjectsParams} + * @return parameter "objinfo" of list of original type "object_info" (Information about an object, including user provided metadata. obj_id objid - the numerical id of the object. obj_name name - the name of the object. type_string type - the type of the object. timestamp save_date - the save date of the object. obj_ver ver - the version of the object. username saved_by - the user that saved or copied the object. ws_id wsid - the workspace containing the object. ws_name workspace - the workspace containing the object. string chsum - the md5 checksum of the object. int size - the size of the object in bytes. usermeta meta - arbitrary user-supplied metadata about the object.) → tuple of size 11: parameter "objid" of original type "obj_id" (The unique, permanent numerical ID of an object.), parameter "name" of original type "obj_name" (A string used as a name for an object. Any string consisting of alphanumeric characters and the characters |._- that is not an integer is acceptable.), parameter "type" of original type "type_string" (A type string. Specifies the type and its version in a single string in the format [module].[typename]-[major].[minor]: module - a string. The module name of the typespec containing the type. typename - a string. The name of the type as assigned by the typedef statement. major - an integer. The major version of the type. A change in the major version implies the type has changed in a non-backwards compatible way. minor - an integer. The minor version of the type. A change in the minor version implies that the type has changed in a way that is backwards compatible with previous type definitions. In many cases, the major and minor versions are optional, and if not provided the most recent version will be used. Example: MyModule.MyType-3.1), parameter "save_date" of original type "timestamp" (A time in the format YYYY-MM-DDThh:mm:ssZ, where Z is either the character Z (representing the UTC timezone) or the difference in time to UTC in the format +/-HHMM, eg: 2012-12-17T23:24:06-0500 (EST time) 2013-04-03T08:56:32+0000 (UTC time) 2013-04-03T08:56:32Z (UTC time)), parameter "version" of Long, parameter "saved_by" of original type "username" (Login name of a KBase user account.), parameter "wsid" of original type "ws_id" (The unique, permanent numerical ID of a workspace.), parameter "workspace" of original type "ws_name" (A string used as a name for a workspace. Any string consisting of alphanumeric characters and "_", ".", or "-" that is not an integer is acceptable. The name may optionally be prefixed with the workspace owner's user name and a colon, e.g. kbasetest:my_workspace.), parameter "chsum" of String, parameter "size" of Long, parameter "meta" of original type "usermeta" (User provided metadata about an object. Arbitrary key-value pairs provided by the user.) → mapping from String to String + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public List>> listObjects(ListObjectsParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(params); + TypeReference>>>> retType = new TypeReference>>>>() {}; + List>>> res = caller.jsonrpcCall("Workspace.list_objects", args, retType, true, false, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: get_objectmeta

+ *
+     * Retrieves the metadata for a specified object from the specified
+     * workspace. Provides access to metadata for all versions of the object
+     * via the instance parameter. Provided for backwards compatibility.
+     * @deprecated Workspace.get_object_info3
+     * 
+ * @param params instance of type {@link us.kbase.workspace.GetObjectmetaParams GetObjectmetaParams} (original type "get_objectmeta_params") + * @return parameter "metadata" of original type "object_metadata" (Meta data associated with an object stored in a workspace. Provided for backwards compatibility. obj_name id - name of the object. type_string type - type of the object. timestamp moddate - date when the object was saved obj_ver instance - the version of the object string command - Deprecated. Always returns the empty string. username lastmodifier - name of the user who last saved the object, including copying the object username owner - Deprecated. Same as lastmodifier. ws_name workspace - name of the workspace in which the object is stored string ref - Deprecated. Always returns the empty string. string chsum - the md5 checksum of the object. usermeta metadata - arbitrary user-supplied metadata about the object. obj_id objid - the numerical id of the object. @deprecated object_info) → tuple of size 12: parameter "id" of original type "obj_name" (A string used as a name for an object. Any string consisting of alphanumeric characters and the characters |._- that is not an integer is acceptable.), parameter "type" of original type "type_string" (A type string. Specifies the type and its version in a single string in the format [module].[typename]-[major].[minor]: module - a string. The module name of the typespec containing the type. typename - a string. The name of the type as assigned by the typedef statement. major - an integer. The major version of the type. A change in the major version implies the type has changed in a non-backwards compatible way. minor - an integer. The minor version of the type. A change in the minor version implies that the type has changed in a way that is backwards compatible with previous type definitions. In many cases, the major and minor versions are optional, and if not provided the most recent version will be used. Example: MyModule.MyType-3.1), parameter "moddate" of original type "timestamp" (A time in the format YYYY-MM-DDThh:mm:ssZ, where Z is either the character Z (representing the UTC timezone) or the difference in time to UTC in the format +/-HHMM, eg: 2012-12-17T23:24:06-0500 (EST time) 2013-04-03T08:56:32+0000 (UTC time) 2013-04-03T08:56:32Z (UTC time)), parameter "instance" of Long, parameter "command" of String, parameter "lastmodifier" of original type "username" (Login name of a KBase user account.), parameter "owner" of original type "username" (Login name of a KBase user account.), parameter "workspace" of original type "ws_name" (A string used as a name for a workspace. Any string consisting of alphanumeric characters and "_", ".", or "-" that is not an integer is acceptable. The name may optionally be prefixed with the workspace owner's user name and a colon, e.g. kbasetest:my_workspace.), parameter "ref" of String, parameter "chsum" of String, parameter "metadata" of original type "usermeta" (User provided metadata about an object. Arbitrary key-value pairs provided by the user.) → mapping from String to String, parameter "objid" of original type "obj_id" (The unique, permanent numerical ID of an object.) + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public Tuple12, Long> getObjectmeta(GetObjectmetaParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(params); + TypeReference, Long>>> retType = new TypeReference, Long>>>() {}; + List, Long>> res = caller.jsonrpcCall("Workspace.get_objectmeta", args, retType, true, false, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: get_object_info

+ *
+     * Get information about objects from the workspace.
+     * Set includeMetadata true to include the user specified metadata.
+     * Otherwise the metadata in the object_info will be null.
+     * This method will be replaced by the behavior of get_object_info_new
+     * in the future.
+     * @deprecated Workspace.get_object_info3
+     * 
+ * @param objectIds instance of list of type {@link us.kbase.workspace.ObjectIdentity ObjectIdentity} + * @param includeMetadata instance of original type "boolean" (A boolean. 0 = false, other = true.) + * @return parameter "info" of list of original type "object_info" (Information about an object, including user provided metadata. obj_id objid - the numerical id of the object. obj_name name - the name of the object. type_string type - the type of the object. timestamp save_date - the save date of the object. obj_ver ver - the version of the object. username saved_by - the user that saved or copied the object. ws_id wsid - the workspace containing the object. ws_name workspace - the workspace containing the object. string chsum - the md5 checksum of the object. int size - the size of the object in bytes. usermeta meta - arbitrary user-supplied metadata about the object.) → tuple of size 11: parameter "objid" of original type "obj_id" (The unique, permanent numerical ID of an object.), parameter "name" of original type "obj_name" (A string used as a name for an object. Any string consisting of alphanumeric characters and the characters |._- that is not an integer is acceptable.), parameter "type" of original type "type_string" (A type string. Specifies the type and its version in a single string in the format [module].[typename]-[major].[minor]: module - a string. The module name of the typespec containing the type. typename - a string. The name of the type as assigned by the typedef statement. major - an integer. The major version of the type. A change in the major version implies the type has changed in a non-backwards compatible way. minor - an integer. The minor version of the type. A change in the minor version implies that the type has changed in a way that is backwards compatible with previous type definitions. In many cases, the major and minor versions are optional, and if not provided the most recent version will be used. Example: MyModule.MyType-3.1), parameter "save_date" of original type "timestamp" (A time in the format YYYY-MM-DDThh:mm:ssZ, where Z is either the character Z (representing the UTC timezone) or the difference in time to UTC in the format +/-HHMM, eg: 2012-12-17T23:24:06-0500 (EST time) 2013-04-03T08:56:32+0000 (UTC time) 2013-04-03T08:56:32Z (UTC time)), parameter "version" of Long, parameter "saved_by" of original type "username" (Login name of a KBase user account.), parameter "wsid" of original type "ws_id" (The unique, permanent numerical ID of a workspace.), parameter "workspace" of original type "ws_name" (A string used as a name for a workspace. Any string consisting of alphanumeric characters and "_", ".", or "-" that is not an integer is acceptable. The name may optionally be prefixed with the workspace owner's user name and a colon, e.g. kbasetest:my_workspace.), parameter "chsum" of String, parameter "size" of Long, parameter "meta" of original type "usermeta" (User provided metadata about an object. Arbitrary key-value pairs provided by the user.) → mapping from String to String + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public List>> getObjectInfo(List objectIds, Long includeMetadata, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(objectIds); + args.add(includeMetadata); + TypeReference>>>> retType = new TypeReference>>>>() {}; + List>>> res = caller.jsonrpcCall("Workspace.get_object_info", args, retType, true, false, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: get_object_info_new

+ *
+     * Get information about objects from the workspace.
+     * @deprecated Workspace.get_object_info3
+     * 
+ * @param params instance of type {@link us.kbase.workspace.GetObjectInfoNewParams GetObjectInfoNewParams} + * @return parameter "info" of list of original type "object_info" (Information about an object, including user provided metadata. obj_id objid - the numerical id of the object. obj_name name - the name of the object. type_string type - the type of the object. timestamp save_date - the save date of the object. obj_ver ver - the version of the object. username saved_by - the user that saved or copied the object. ws_id wsid - the workspace containing the object. ws_name workspace - the workspace containing the object. string chsum - the md5 checksum of the object. int size - the size of the object in bytes. usermeta meta - arbitrary user-supplied metadata about the object.) → tuple of size 11: parameter "objid" of original type "obj_id" (The unique, permanent numerical ID of an object.), parameter "name" of original type "obj_name" (A string used as a name for an object. Any string consisting of alphanumeric characters and the characters |._- that is not an integer is acceptable.), parameter "type" of original type "type_string" (A type string. Specifies the type and its version in a single string in the format [module].[typename]-[major].[minor]: module - a string. The module name of the typespec containing the type. typename - a string. The name of the type as assigned by the typedef statement. major - an integer. The major version of the type. A change in the major version implies the type has changed in a non-backwards compatible way. minor - an integer. The minor version of the type. A change in the minor version implies that the type has changed in a way that is backwards compatible with previous type definitions. In many cases, the major and minor versions are optional, and if not provided the most recent version will be used. Example: MyModule.MyType-3.1), parameter "save_date" of original type "timestamp" (A time in the format YYYY-MM-DDThh:mm:ssZ, where Z is either the character Z (representing the UTC timezone) or the difference in time to UTC in the format +/-HHMM, eg: 2012-12-17T23:24:06-0500 (EST time) 2013-04-03T08:56:32+0000 (UTC time) 2013-04-03T08:56:32Z (UTC time)), parameter "version" of Long, parameter "saved_by" of original type "username" (Login name of a KBase user account.), parameter "wsid" of original type "ws_id" (The unique, permanent numerical ID of a workspace.), parameter "workspace" of original type "ws_name" (A string used as a name for a workspace. Any string consisting of alphanumeric characters and "_", ".", or "-" that is not an integer is acceptable. The name may optionally be prefixed with the workspace owner's user name and a colon, e.g. kbasetest:my_workspace.), parameter "chsum" of String, parameter "size" of Long, parameter "meta" of original type "usermeta" (User provided metadata about an object. Arbitrary key-value pairs provided by the user.) → mapping from String to String + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public List>> getObjectInfoNew(GetObjectInfoNewParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(params); + TypeReference>>>> retType = new TypeReference>>>>() {}; + List>>> res = caller.jsonrpcCall("Workspace.get_object_info_new", args, retType, true, false, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: get_object_info3

+ *
+     * 
+ * @param params instance of type {@link us.kbase.workspace.GetObjectInfo3Params GetObjectInfo3Params} + * @return parameter "results" of type {@link us.kbase.workspace.GetObjectInfo3Results GetObjectInfo3Results} + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public GetObjectInfo3Results getObjectInfo3(GetObjectInfo3Params params, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(params); + TypeReference> retType = new TypeReference>() {}; + List res = caller.jsonrpcCall("Workspace.get_object_info3", args, retType, true, false, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: rename_workspace

+ *
+     * Rename a workspace.
+     * 
+ * @param params instance of type {@link us.kbase.workspace.RenameWorkspaceParams RenameWorkspaceParams} + * @return parameter "renamed" of original type "workspace_info" (Information about a workspace. ws_id id - the numerical ID of the workspace. ws_name workspace - name of the workspace. username owner - name of the user who owns (e.g. created) this workspace. timestamp moddate - date when the workspace was last modified. int max_objid - the maximum object ID appearing in this workspace. Since cloning a workspace preserves object IDs, this number may be greater than the number of objects in a newly cloned workspace. permission user_permission - permissions for the authenticated user of this workspace. permission globalread - whether this workspace is globally readable. lock_status lockstat - the status of the workspace lock. usermeta metadata - arbitrary user-supplied metadata about the workspace.) → tuple of size 9: parameter "id" of original type "ws_id" (The unique, permanent numerical ID of a workspace.), parameter "workspace" of original type "ws_name" (A string used as a name for a workspace. Any string consisting of alphanumeric characters and "_", ".", or "-" that is not an integer is acceptable. The name may optionally be prefixed with the workspace owner's user name and a colon, e.g. kbasetest:my_workspace.), parameter "owner" of original type "username" (Login name of a KBase user account.), parameter "moddate" of original type "timestamp" (A time in the format YYYY-MM-DDThh:mm:ssZ, where Z is either the character Z (representing the UTC timezone) or the difference in time to UTC in the format +/-HHMM, eg: 2012-12-17T23:24:06-0500 (EST time) 2013-04-03T08:56:32+0000 (UTC time) 2013-04-03T08:56:32Z (UTC time)), parameter "max_objid" of Long, parameter "user_permission" of original type "permission" (Represents the permissions a user or users have to a workspace: 'a' - administrator. All operations allowed. 'w' - read/write. 'r' - read. 'n' - no permissions.), parameter "globalread" of original type "permission" (Represents the permissions a user or users have to a workspace: 'a' - administrator. All operations allowed. 'w' - read/write. 'r' - read. 'n' - no permissions.), parameter "lockstat" of original type "lock_status" (The lock status of a workspace. One of 'unlocked', 'locked', or 'published'.), parameter "metadata" of original type "usermeta" (User provided metadata about an object. Arbitrary key-value pairs provided by the user.) → mapping from String to String + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public Tuple9> renameWorkspace(RenameWorkspaceParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(params); + TypeReference>>> retType = new TypeReference>>>() {}; + List>> res = caller.jsonrpcCall("Workspace.rename_workspace", args, retType, true, true, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: rename_object

+ *
+     * Rename an object. User meta data is always returned as null.
+     * 
+ * @param params instance of type {@link us.kbase.workspace.RenameObjectParams RenameObjectParams} + * @return parameter "renamed" of original type "object_info" (Information about an object, including user provided metadata. obj_id objid - the numerical id of the object. obj_name name - the name of the object. type_string type - the type of the object. timestamp save_date - the save date of the object. obj_ver ver - the version of the object. username saved_by - the user that saved or copied the object. ws_id wsid - the workspace containing the object. ws_name workspace - the workspace containing the object. string chsum - the md5 checksum of the object. int size - the size of the object in bytes. usermeta meta - arbitrary user-supplied metadata about the object.) → tuple of size 11: parameter "objid" of original type "obj_id" (The unique, permanent numerical ID of an object.), parameter "name" of original type "obj_name" (A string used as a name for an object. Any string consisting of alphanumeric characters and the characters |._- that is not an integer is acceptable.), parameter "type" of original type "type_string" (A type string. Specifies the type and its version in a single string in the format [module].[typename]-[major].[minor]: module - a string. The module name of the typespec containing the type. typename - a string. The name of the type as assigned by the typedef statement. major - an integer. The major version of the type. A change in the major version implies the type has changed in a non-backwards compatible way. minor - an integer. The minor version of the type. A change in the minor version implies that the type has changed in a way that is backwards compatible with previous type definitions. In many cases, the major and minor versions are optional, and if not provided the most recent version will be used. Example: MyModule.MyType-3.1), parameter "save_date" of original type "timestamp" (A time in the format YYYY-MM-DDThh:mm:ssZ, where Z is either the character Z (representing the UTC timezone) or the difference in time to UTC in the format +/-HHMM, eg: 2012-12-17T23:24:06-0500 (EST time) 2013-04-03T08:56:32+0000 (UTC time) 2013-04-03T08:56:32Z (UTC time)), parameter "version" of Long, parameter "saved_by" of original type "username" (Login name of a KBase user account.), parameter "wsid" of original type "ws_id" (The unique, permanent numerical ID of a workspace.), parameter "workspace" of original type "ws_name" (A string used as a name for a workspace. Any string consisting of alphanumeric characters and "_", ".", or "-" that is not an integer is acceptable. The name may optionally be prefixed with the workspace owner's user name and a colon, e.g. kbasetest:my_workspace.), parameter "chsum" of String, parameter "size" of Long, parameter "meta" of original type "usermeta" (User provided metadata about an object. Arbitrary key-value pairs provided by the user.) → mapping from String to String + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public Tuple11> renameObject(RenameObjectParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(params); + TypeReference>>> retType = new TypeReference>>>() {}; + List>> res = caller.jsonrpcCall("Workspace.rename_object", args, retType, true, true, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: copy_object

+ *
+     * Copy an object. Returns the object_info for the newest version.
+     * 
+ * @param params instance of type {@link us.kbase.workspace.CopyObjectParams CopyObjectParams} + * @return parameter "copied" of original type "object_info" (Information about an object, including user provided metadata. obj_id objid - the numerical id of the object. obj_name name - the name of the object. type_string type - the type of the object. timestamp save_date - the save date of the object. obj_ver ver - the version of the object. username saved_by - the user that saved or copied the object. ws_id wsid - the workspace containing the object. ws_name workspace - the workspace containing the object. string chsum - the md5 checksum of the object. int size - the size of the object in bytes. usermeta meta - arbitrary user-supplied metadata about the object.) → tuple of size 11: parameter "objid" of original type "obj_id" (The unique, permanent numerical ID of an object.), parameter "name" of original type "obj_name" (A string used as a name for an object. Any string consisting of alphanumeric characters and the characters |._- that is not an integer is acceptable.), parameter "type" of original type "type_string" (A type string. Specifies the type and its version in a single string in the format [module].[typename]-[major].[minor]: module - a string. The module name of the typespec containing the type. typename - a string. The name of the type as assigned by the typedef statement. major - an integer. The major version of the type. A change in the major version implies the type has changed in a non-backwards compatible way. minor - an integer. The minor version of the type. A change in the minor version implies that the type has changed in a way that is backwards compatible with previous type definitions. In many cases, the major and minor versions are optional, and if not provided the most recent version will be used. Example: MyModule.MyType-3.1), parameter "save_date" of original type "timestamp" (A time in the format YYYY-MM-DDThh:mm:ssZ, where Z is either the character Z (representing the UTC timezone) or the difference in time to UTC in the format +/-HHMM, eg: 2012-12-17T23:24:06-0500 (EST time) 2013-04-03T08:56:32+0000 (UTC time) 2013-04-03T08:56:32Z (UTC time)), parameter "version" of Long, parameter "saved_by" of original type "username" (Login name of a KBase user account.), parameter "wsid" of original type "ws_id" (The unique, permanent numerical ID of a workspace.), parameter "workspace" of original type "ws_name" (A string used as a name for a workspace. Any string consisting of alphanumeric characters and "_", ".", or "-" that is not an integer is acceptable. The name may optionally be prefixed with the workspace owner's user name and a colon, e.g. kbasetest:my_workspace.), parameter "chsum" of String, parameter "size" of Long, parameter "meta" of original type "usermeta" (User provided metadata about an object. Arbitrary key-value pairs provided by the user.) → mapping from String to String + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public Tuple11> copyObject(CopyObjectParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(params); + TypeReference>>> retType = new TypeReference>>>() {}; + List>> res = caller.jsonrpcCall("Workspace.copy_object", args, retType, true, true, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: revert_object

+ *
+     * Revert an object.
+     *                 The object specified in the ObjectIdentity is reverted to the version
+     *                 specified in the ObjectIdentity.
+     * 
+ * @param object instance of type {@link us.kbase.workspace.ObjectIdentity ObjectIdentity} + * @return parameter "reverted" of original type "object_info" (Information about an object, including user provided metadata. obj_id objid - the numerical id of the object. obj_name name - the name of the object. type_string type - the type of the object. timestamp save_date - the save date of the object. obj_ver ver - the version of the object. username saved_by - the user that saved or copied the object. ws_id wsid - the workspace containing the object. ws_name workspace - the workspace containing the object. string chsum - the md5 checksum of the object. int size - the size of the object in bytes. usermeta meta - arbitrary user-supplied metadata about the object.) → tuple of size 11: parameter "objid" of original type "obj_id" (The unique, permanent numerical ID of an object.), parameter "name" of original type "obj_name" (A string used as a name for an object. Any string consisting of alphanumeric characters and the characters |._- that is not an integer is acceptable.), parameter "type" of original type "type_string" (A type string. Specifies the type and its version in a single string in the format [module].[typename]-[major].[minor]: module - a string. The module name of the typespec containing the type. typename - a string. The name of the type as assigned by the typedef statement. major - an integer. The major version of the type. A change in the major version implies the type has changed in a non-backwards compatible way. minor - an integer. The minor version of the type. A change in the minor version implies that the type has changed in a way that is backwards compatible with previous type definitions. In many cases, the major and minor versions are optional, and if not provided the most recent version will be used. Example: MyModule.MyType-3.1), parameter "save_date" of original type "timestamp" (A time in the format YYYY-MM-DDThh:mm:ssZ, where Z is either the character Z (representing the UTC timezone) or the difference in time to UTC in the format +/-HHMM, eg: 2012-12-17T23:24:06-0500 (EST time) 2013-04-03T08:56:32+0000 (UTC time) 2013-04-03T08:56:32Z (UTC time)), parameter "version" of Long, parameter "saved_by" of original type "username" (Login name of a KBase user account.), parameter "wsid" of original type "ws_id" (The unique, permanent numerical ID of a workspace.), parameter "workspace" of original type "ws_name" (A string used as a name for a workspace. Any string consisting of alphanumeric characters and "_", ".", or "-" that is not an integer is acceptable. The name may optionally be prefixed with the workspace owner's user name and a colon, e.g. kbasetest:my_workspace.), parameter "chsum" of String, parameter "size" of Long, parameter "meta" of original type "usermeta" (User provided metadata about an object. Arbitrary key-value pairs provided by the user.) → mapping from String to String + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public Tuple11> revertObject(ObjectIdentity object, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(object); + TypeReference>>> retType = new TypeReference>>>() {}; + List>> res = caller.jsonrpcCall("Workspace.revert_object", args, retType, true, true, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: get_names_by_prefix

+ *
+     * Get object names matching a prefix. At most 1000 names are returned.
+     * No particular ordering is guaranteed, nor is which names will be
+     * returned if more than 1000 are found.
+     * This function is intended for use as an autocomplete helper function.
+     * 
+ * @param params instance of type {@link us.kbase.workspace.GetNamesByPrefixParams GetNamesByPrefixParams} + * @return parameter "res" of type {@link us.kbase.workspace.GetNamesByPrefixResults GetNamesByPrefixResults} + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public GetNamesByPrefixResults getNamesByPrefix(GetNamesByPrefixParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(params); + TypeReference> retType = new TypeReference>() {}; + List res = caller.jsonrpcCall("Workspace.get_names_by_prefix", args, retType, true, false, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: hide_objects

+ *
+     * Hide objects. All versions of an object are hidden, regardless of
+     * the version specified in the ObjectIdentity. Hidden objects do not
+     * appear in the list_objects method.
+     * 
+ * @param objectIds instance of list of type {@link us.kbase.workspace.ObjectIdentity ObjectIdentity} + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public void hideObjects(List objectIds, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(objectIds); + TypeReference retType = new TypeReference() {}; + caller.jsonrpcCall("Workspace.hide_objects", args, retType, false, true, jsonRpcContext, this.serviceVersion); + } + + /** + *

Original spec-file function name: unhide_objects

+ *
+     * Unhide objects. All versions of an object are unhidden, regardless
+     * of the version specified in the ObjectIdentity.
+     * 
+ * @param objectIds instance of list of type {@link us.kbase.workspace.ObjectIdentity ObjectIdentity} + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public void unhideObjects(List objectIds, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(objectIds); + TypeReference retType = new TypeReference() {}; + caller.jsonrpcCall("Workspace.unhide_objects", args, retType, false, true, jsonRpcContext, this.serviceVersion); + } + + /** + *

Original spec-file function name: delete_objects

+ *
+     * Delete objects. All versions of an object are deleted, regardless of
+     * the version specified in the ObjectIdentity.
+     * 
+ * @param objectIds instance of list of type {@link us.kbase.workspace.ObjectIdentity ObjectIdentity} + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public void deleteObjects(List objectIds, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(objectIds); + TypeReference retType = new TypeReference() {}; + caller.jsonrpcCall("Workspace.delete_objects", args, retType, false, true, jsonRpcContext, this.serviceVersion); + } + + /** + *

Original spec-file function name: undelete_objects

+ *
+     * Undelete objects. All versions of an object are undeleted, regardless
+     * of the version specified in the ObjectIdentity. If an object is not
+     * deleted, no error is thrown.
+     * 
+ * @param objectIds instance of list of type {@link us.kbase.workspace.ObjectIdentity ObjectIdentity} + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public void undeleteObjects(List objectIds, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(objectIds); + TypeReference retType = new TypeReference() {}; + caller.jsonrpcCall("Workspace.undelete_objects", args, retType, false, true, jsonRpcContext, this.serviceVersion); + } + + /** + *

Original spec-file function name: delete_workspace

+ *
+     * Delete a workspace. All objects contained in the workspace are deleted.
+     * 
+ * @param wsi instance of type {@link us.kbase.workspace.WorkspaceIdentity WorkspaceIdentity} + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public void deleteWorkspace(WorkspaceIdentity wsi, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(wsi); + TypeReference retType = new TypeReference() {}; + caller.jsonrpcCall("Workspace.delete_workspace", args, retType, false, true, jsonRpcContext, this.serviceVersion); + } + + /** + *

Original spec-file function name: request_module_ownership

+ *
+     * Request ownership of a module name. A Workspace administrator
+     * must approve the request.
+     * 
+ * @param mod instance of original type "modulename" (A module name defined in a KIDL typespec.) + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public void requestModuleOwnership(String mod, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(mod); + TypeReference retType = new TypeReference() {}; + caller.jsonrpcCall("Workspace.request_module_ownership", args, retType, false, true, jsonRpcContext, this.serviceVersion); + } + + /** + *

Original spec-file function name: register_typespec

+ *
+     * Register a new typespec or recompile a previously registered typespec
+     * with new options.
+     * See the documentation of RegisterTypespecParams for more details.
+     * Also see the release_types function.
+     * 
+ * @param params instance of type {@link us.kbase.workspace.RegisterTypespecParams RegisterTypespecParams} + * @return instance of mapping from original type "type_string" (A type string. Specifies the type and its version in a single string in the format [module].[typename]-[major].[minor]: module - a string. The module name of the typespec containing the type. typename - a string. The name of the type as assigned by the typedef statement. major - an integer. The major version of the type. A change in the major version implies the type has changed in a non-backwards compatible way. minor - an integer. The minor version of the type. A change in the minor version implies that the type has changed in a way that is backwards compatible with previous type definitions. In many cases, the major and minor versions are optional, and if not provided the most recent version will be used. Example: MyModule.MyType-3.1) to original type "jsonschema" (The JSON Schema (v4) representation of a type definition.) + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public Map registerTypespec(RegisterTypespecParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(params); + TypeReference>> retType = new TypeReference>>() {}; + List> res = caller.jsonrpcCall("Workspace.register_typespec", args, retType, true, true, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: register_typespec_copy

+ *
+     * Register a copy of new typespec or refresh an existing typespec which is
+     * loaded from another workspace for synchronization. Method returns new
+     * version of module in current workspace.
+     * Also see the release_types function.
+     * 
+ * @param params instance of type {@link us.kbase.workspace.RegisterTypespecCopyParams RegisterTypespecCopyParams} + * @return parameter "new_local_version" of original type "spec_version" (The version of a typespec file.) + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public Long registerTypespecCopy(RegisterTypespecCopyParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(params); + TypeReference> retType = new TypeReference>() {}; + List res = caller.jsonrpcCall("Workspace.register_typespec_copy", args, retType, true, true, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: release_module

+ *
+     * Release a module for general use of its types.
+     *                 Releases the most recent version of a module. Releasing a module does
+     *                 two things to the module's types:
+     *                 1) If a type's major version is 0, it is changed to 1. A major
+     *                         version of 0 implies that the type is in development and may have
+     *                         backwards incompatible changes from minor version to minor version.
+     *                         Once a type is released, backwards incompatible changes always
+     *                         cause a major version increment.
+     *                 2) This version of the type becomes the default version, and if a
+     *                         specific version is not supplied in a function call, this version
+     *                         will be used. This means that newer, unreleased versions of the
+     *                         type may be skipped.
+     * 
+ * @param mod instance of original type "modulename" (A module name defined in a KIDL typespec.) + * @return parameter "types" of list of original type "type_string" (A type string. Specifies the type and its version in a single string in the format [module].[typename]-[major].[minor]: module - a string. The module name of the typespec containing the type. typename - a string. The name of the type as assigned by the typedef statement. major - an integer. The major version of the type. A change in the major version implies the type has changed in a non-backwards compatible way. minor - an integer. The minor version of the type. A change in the minor version implies that the type has changed in a way that is backwards compatible with previous type definitions. In many cases, the major and minor versions are optional, and if not provided the most recent version will be used. Example: MyModule.MyType-3.1) + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public List releaseModule(String mod, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(mod); + TypeReference>> retType = new TypeReference>>() {}; + List> res = caller.jsonrpcCall("Workspace.release_module", args, retType, true, true, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: list_modules

+ *
+     * List typespec modules.
+     * 
+ * @param params instance of type {@link us.kbase.workspace.ListModulesParams ListModulesParams} + * @return parameter "modules" of list of original type "modulename" (A module name defined in a KIDL typespec.) + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public List listModules(ListModulesParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(params); + TypeReference>> retType = new TypeReference>>() {}; + List> res = caller.jsonrpcCall("Workspace.list_modules", args, retType, true, false, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: list_module_versions

+ *
+     * List typespec module versions.
+     * 
+ * @param params instance of type {@link us.kbase.workspace.ListModuleVersionsParams ListModuleVersionsParams} + * @return parameter "vers" of type {@link us.kbase.workspace.ModuleVersions ModuleVersions} + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public ModuleVersions listModuleVersions(ListModuleVersionsParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(params); + TypeReference> retType = new TypeReference>() {}; + List res = caller.jsonrpcCall("Workspace.list_module_versions", args, retType, true, false, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: get_module_info

+ *
+     * 
+ * @param params instance of type {@link us.kbase.workspace.GetModuleInfoParams GetModuleInfoParams} + * @return parameter "info" of type {@link us.kbase.workspace.ModuleInfo ModuleInfo} + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public ModuleInfo getModuleInfo(GetModuleInfoParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(params); + TypeReference> retType = new TypeReference>() {}; + List res = caller.jsonrpcCall("Workspace.get_module_info", args, retType, true, false, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: get_jsonschema

+ *
+     * Get JSON schema for a type.
+     * 
+ * @param type instance of original type "type_string" (A type string. Specifies the type and its version in a single string in the format [module].[typename]-[major].[minor]: module - a string. The module name of the typespec containing the type. typename - a string. The name of the type as assigned by the typedef statement. major - an integer. The major version of the type. A change in the major version implies the type has changed in a non-backwards compatible way. minor - an integer. The minor version of the type. A change in the minor version implies that the type has changed in a way that is backwards compatible with previous type definitions. In many cases, the major and minor versions are optional, and if not provided the most recent version will be used. Example: MyModule.MyType-3.1) + * @return parameter "schema" of original type "jsonschema" (The JSON Schema (v4) representation of a type definition.) + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public String getJsonschema(String type, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(type); + TypeReference> retType = new TypeReference>() {}; + List res = caller.jsonrpcCall("Workspace.get_jsonschema", args, retType, true, false, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: translate_from_MD5_types

+ *
+     * Translation from types qualified with MD5 to their semantic versions
+     * 
+ * @param md5Types instance of list of original type "type_string" (A type string. Specifies the type and its version in a single string in the format [module].[typename]-[major].[minor]: module - a string. The module name of the typespec containing the type. typename - a string. The name of the type as assigned by the typedef statement. major - an integer. The major version of the type. A change in the major version implies the type has changed in a non-backwards compatible way. minor - an integer. The minor version of the type. A change in the minor version implies that the type has changed in a way that is backwards compatible with previous type definitions. In many cases, the major and minor versions are optional, and if not provided the most recent version will be used. Example: MyModule.MyType-3.1) + * @return parameter "sem_types" of mapping from original type "type_string" (A type string. Specifies the type and its version in a single string in the format [module].[typename]-[major].[minor]: module - a string. The module name of the typespec containing the type. typename - a string. The name of the type as assigned by the typedef statement. major - an integer. The major version of the type. A change in the major version implies the type has changed in a non-backwards compatible way. minor - an integer. The minor version of the type. A change in the minor version implies that the type has changed in a way that is backwards compatible with previous type definitions. In many cases, the major and minor versions are optional, and if not provided the most recent version will be used. Example: MyModule.MyType-3.1) to list of original type "type_string" (A type string. Specifies the type and its version in a single string in the format [module].[typename]-[major].[minor]: module - a string. The module name of the typespec containing the type. typename - a string. The name of the type as assigned by the typedef statement. major - an integer. The major version of the type. A change in the major version implies the type has changed in a non-backwards compatible way. minor - an integer. The minor version of the type. A change in the minor version implies that the type has changed in a way that is backwards compatible with previous type definitions. In many cases, the major and minor versions are optional, and if not provided the most recent version will be used. Example: MyModule.MyType-3.1) + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public Map> translateFromMD5Types(List md5Types, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(md5Types); + TypeReference>>> retType = new TypeReference>>>() {}; + List>> res = caller.jsonrpcCall("Workspace.translate_from_MD5_types", args, retType, true, false, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: translate_to_MD5_types

+ *
+     * Translation from types qualified with semantic versions to their MD5'ed versions
+     * 
+ * @param semTypes instance of list of original type "type_string" (A type string. Specifies the type and its version in a single string in the format [module].[typename]-[major].[minor]: module - a string. The module name of the typespec containing the type. typename - a string. The name of the type as assigned by the typedef statement. major - an integer. The major version of the type. A change in the major version implies the type has changed in a non-backwards compatible way. minor - an integer. The minor version of the type. A change in the minor version implies that the type has changed in a way that is backwards compatible with previous type definitions. In many cases, the major and minor versions are optional, and if not provided the most recent version will be used. Example: MyModule.MyType-3.1) + * @return parameter "md5_types" of mapping from original type "type_string" (A type string. Specifies the type and its version in a single string in the format [module].[typename]-[major].[minor]: module - a string. The module name of the typespec containing the type. typename - a string. The name of the type as assigned by the typedef statement. major - an integer. The major version of the type. A change in the major version implies the type has changed in a non-backwards compatible way. minor - an integer. The minor version of the type. A change in the minor version implies that the type has changed in a way that is backwards compatible with previous type definitions. In many cases, the major and minor versions are optional, and if not provided the most recent version will be used. Example: MyModule.MyType-3.1) to original type "type_string" (A type string. Specifies the type and its version in a single string in the format [module].[typename]-[major].[minor]: module - a string. The module name of the typespec containing the type. typename - a string. The name of the type as assigned by the typedef statement. major - an integer. The major version of the type. A change in the major version implies the type has changed in a non-backwards compatible way. minor - an integer. The minor version of the type. A change in the minor version implies that the type has changed in a way that is backwards compatible with previous type definitions. In many cases, the major and minor versions are optional, and if not provided the most recent version will be used. Example: MyModule.MyType-3.1) + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public Map translateToMD5Types(List semTypes, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(semTypes); + TypeReference>> retType = new TypeReference>>() {}; + List> res = caller.jsonrpcCall("Workspace.translate_to_MD5_types", args, retType, true, false, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: get_type_info

+ *
+     * 
+ * @param type instance of original type "type_string" (A type string. Specifies the type and its version in a single string in the format [module].[typename]-[major].[minor]: module - a string. The module name of the typespec containing the type. typename - a string. The name of the type as assigned by the typedef statement. major - an integer. The major version of the type. A change in the major version implies the type has changed in a non-backwards compatible way. minor - an integer. The minor version of the type. A change in the minor version implies that the type has changed in a way that is backwards compatible with previous type definitions. In many cases, the major and minor versions are optional, and if not provided the most recent version will be used. Example: MyModule.MyType-3.1) + * @return parameter "info" of type {@link us.kbase.workspace.TypeInfo TypeInfo} + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public TypeInfo getTypeInfo(String type, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(type); + TypeReference> retType = new TypeReference>() {}; + List res = caller.jsonrpcCall("Workspace.get_type_info", args, retType, true, false, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: get_all_type_info

+ *
+     * 
+ * @param mod instance of original type "modulename" (A module name defined in a KIDL typespec.) + * @return instance of list of type {@link us.kbase.workspace.TypeInfo TypeInfo} + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public List getAllTypeInfo(String mod, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(mod); + TypeReference>> retType = new TypeReference>>() {}; + List> res = caller.jsonrpcCall("Workspace.get_all_type_info", args, retType, true, false, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: get_func_info

+ *
+     * @deprecated
+     * 
+ * @param func instance of original type "func_string" (A function string for referencing a funcdef. Specifies the function and its version in a single string in the format [modulename].[funcname]-[major].[minor]: modulename - a string. The name of the module containing the function. funcname - a string. The name of the function as assigned by the funcdef statement. major - an integer. The major version of the function. A change in the major version implies the function has changed in a non-backwards compatible way. minor - an integer. The minor version of the function. A change in the minor version implies that the function has changed in a way that is backwards compatible with previous function definitions. In many cases, the major and minor versions are optional, and if not provided the most recent version will be used. Example: MyModule.MyFunc-3.1) + * @return parameter "info" of type {@link us.kbase.workspace.FuncInfo FuncInfo} + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public FuncInfo getFuncInfo(String func, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(func); + TypeReference> retType = new TypeReference>() {}; + List res = caller.jsonrpcCall("Workspace.get_func_info", args, retType, true, false, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: get_all_func_info

+ *
+     * @deprecated
+     * 
+ * @param mod instance of original type "modulename" (A module name defined in a KIDL typespec.) + * @return parameter "info" of list of type {@link us.kbase.workspace.FuncInfo FuncInfo} + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public List getAllFuncInfo(String mod, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(mod); + TypeReference>> retType = new TypeReference>>() {}; + List> res = caller.jsonrpcCall("Workspace.get_all_func_info", args, retType, true, false, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: grant_module_ownership

+ *
+     * Grant ownership of a module. You must have grant ability on the
+     * module.
+     * 
+ * @param params instance of type {@link us.kbase.workspace.GrantModuleOwnershipParams GrantModuleOwnershipParams} + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public void grantModuleOwnership(GrantModuleOwnershipParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(params); + TypeReference retType = new TypeReference() {}; + caller.jsonrpcCall("Workspace.grant_module_ownership", args, retType, false, true, jsonRpcContext, this.serviceVersion); + } + + /** + *

Original spec-file function name: remove_module_ownership

+ *
+     * Remove ownership from a current owner. You must have the grant ability
+     * on the module.
+     * 
+ * @param params instance of type {@link us.kbase.workspace.RemoveModuleOwnershipParams RemoveModuleOwnershipParams} + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public void removeModuleOwnership(RemoveModuleOwnershipParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(params); + TypeReference retType = new TypeReference() {}; + caller.jsonrpcCall("Workspace.remove_module_ownership", args, retType, false, true, jsonRpcContext, this.serviceVersion); + } + + /** + *

Original spec-file function name: list_all_types

+ *
+     * List all released types with released version from all modules. Return
+     * mapping from module name to mapping from type name to released type
+     * version.
+     * 
+ * @param params instance of type {@link us.kbase.workspace.ListAllTypesParams ListAllTypesParams} + * @return instance of mapping from original type "modulename" (A module name defined in a KIDL typespec.) to mapping from original type "typename" (A type definition name in a KIDL typespec.) to original type "typever" (A version of a type. Specifies the version of the type in a single string in the format [major].[minor]: major - an integer. The major version of the type. A change in the major version implies the type has changed in a non-backwards compatible way. minor - an integer. The minor version of the type. A change in the minor version implies that the type has changed in a way that is backwards compatible with previous type definitions.) + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public Map> listAllTypes(ListAllTypesParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(params); + TypeReference>>> retType = new TypeReference>>>() {}; + List>> res = caller.jsonrpcCall("Workspace.list_all_types", args, retType, true, false, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: get_admin_role

+ *
+     * Get the administrative role for the current user.
+     * 
+ * @return parameter "results" of type {@link us.kbase.workspace.GetAdminRoleResults GetAdminRoleResults} + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public GetAdminRoleResults getAdminRole(RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + TypeReference> retType = new TypeReference>() {}; + List res = caller.jsonrpcCall("Workspace.get_admin_role", args, retType, true, true, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + /** + *

Original spec-file function name: alter_admin_object_metadata

+ *
+     * Update admin metadata for an object. The user must have full workspace service
+     * administration privileges.
+     * 
+ * @param params instance of type {@link us.kbase.workspace.AlterAdminObjectMetadataParams AlterAdminObjectMetadataParams} + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public void alterAdminObjectMetadata(AlterAdminObjectMetadataParams params, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(params); + TypeReference retType = new TypeReference() {}; + caller.jsonrpcCall("Workspace.alter_admin_object_metadata", args, retType, false, true, jsonRpcContext, this.serviceVersion); + } + + /** + *

Original spec-file function name: administer

+ *
+     * The administration interface.
+     * 
+ * @param command instance of unspecified object + * @return parameter "response" of unspecified object + * @throws IOException if an IO exception occurs + * @throws JsonClientException if a JSON RPC exception occurs + */ + public UObject administer(UObject command, RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + args.add(command); + TypeReference> retType = new TypeReference>() {}; + List res = caller.jsonrpcCall("Workspace.administer", args, retType, true, true, jsonRpcContext, this.serviceVersion); + return res.get(0); + } + + public Map status(RpcContext... jsonRpcContext) throws IOException, JsonClientException { + List args = new ArrayList(); + TypeReference>> retType = new TypeReference>>() {}; + List> res = caller.jsonrpcCall("Workspace.status", args, retType, true, false, jsonRpcContext, this.serviceVersion); + return res.get(0); + } +} diff --git a/service/src/main/java/us/kbase/workspace/WorkspaceIdentity.java b/service/src/main/java/us/kbase/workspace/WorkspaceIdentity.java new file mode 100644 index 000000000..02593ed8a --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/WorkspaceIdentity.java @@ -0,0 +1,83 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: WorkspaceIdentity

+ *
+ * A workspace identifier.
+ *                 Select a workspace by one, and only one, of the numerical id or name.
+ *                 ws_id id - the numerical ID of the workspace.
+ *                 ws_name workspace - the name of the workspace.
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "workspace", + "id" +}) +public class WorkspaceIdentity { + + @JsonProperty("workspace") + private String workspace; + @JsonProperty("id") + private Long id; + private Map additionalProperties = new HashMap(); + + @JsonProperty("workspace") + public String getWorkspace() { + return workspace; + } + + @JsonProperty("workspace") + public void setWorkspace(String workspace) { + this.workspace = workspace; + } + + public WorkspaceIdentity withWorkspace(String workspace) { + this.workspace = workspace; + return this; + } + + @JsonProperty("id") + public Long getId() { + return id; + } + + @JsonProperty("id") + public void setId(Long id) { + this.id = id; + } + + public WorkspaceIdentity withId(Long id) { + this.id = id; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + return ((((((("WorkspaceIdentity"+" [workspace=")+ workspace)+", id=")+ id)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/service/src/main/java/us/kbase/workspace/WorkspacePermissions.java b/service/src/main/java/us/kbase/workspace/WorkspacePermissions.java new file mode 100644 index 000000000..fa8342d30 --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/WorkspacePermissions.java @@ -0,0 +1,64 @@ + +package us.kbase.workspace; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + *

Original spec-file type: WorkspacePermissions

+ *
+ * A set of workspace permissions.
+ * perms - the list of permissions for each requested workspace
+ * 
+ * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("com.googlecode.jsonschema2pojo") +@JsonPropertyOrder({ + "perms" +}) +public class WorkspacePermissions { + + @JsonProperty("perms") + private List> perms; + private Map additionalProperties = new HashMap(); + + @JsonProperty("perms") + public List> getPerms() { + return perms; + } + + @JsonProperty("perms") + public void setPerms(List> perms) { + this.perms = perms; + } + + public WorkspacePermissions withPerms(List> perms) { + this.perms = perms; + return this; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperties(java.lang.String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public java.lang.String toString() { + return ((((("WorkspacePermissions"+" [perms=")+ perms)+", additionalProperties=")+ additionalProperties)+"]"); + } + +} diff --git a/src/us/kbase/workspace/WorkspaceServer.java b/service/src/main/java/us/kbase/workspace/WorkspaceServer.java similarity index 99% rename from src/us/kbase/workspace/WorkspaceServer.java rename to service/src/main/java/us/kbase/workspace/WorkspaceServer.java index 317a8a8b6..0b25a11a2 100644 --- a/src/us/kbase/workspace/WorkspaceServer.java +++ b/service/src/main/java/us/kbase/workspace/WorkspaceServer.java @@ -16,9 +16,9 @@ import us.kbase.common.service.UObject; //BEGIN_HEADER -import us.kbase.auth.AuthConfig; import us.kbase.auth.AuthException; -import us.kbase.auth.ConfigurableAuthService; +import us.kbase.auth.client.AuthClient; + import static us.kbase.common.utils.ServiceUtils.checkAddlArgs; import static us.kbase.workspace.kbase.ArgUtils.getGlobalWSPerm; import static us.kbase.workspace.kbase.ArgUtils.wsInfoToTuple; @@ -35,9 +35,7 @@ import static us.kbase.workspace.version.WorkspaceVersion.VERSION; import java.io.IOException; -import java.net.MalformedURLException; import java.net.URISyntaxException; -import java.net.URL; import java.nio.file.Paths; import java.util.Arrays; import java.util.HashMap; @@ -70,6 +68,7 @@ import us.kbase.workspace.database.WorkspaceObjectData; import us.kbase.workspace.database.WorkspaceUser; import us.kbase.workspace.database.WorkspaceUserMetadata; +import us.kbase.workspace.gitcommit.GitCommit; import us.kbase.workspace.kbase.InitWorkspaceServer.InitReporter; import us.kbase.workspace.kbase.InitWorkspaceServer; import us.kbase.workspace.kbase.InitWorkspaceServer.WorkspaceInitResults; @@ -102,7 +101,7 @@ public class WorkspaceServer extends JsonServerServlet { private static final long serialVersionUID = 1L; private static final String version = "0.0.1"; private static final String gitUrl = "https://github.com/mrcreosote/workspace_deluxe"; - private static final String gitCommitHash = "5154d57474407fb8e21e5bcd238c6db20666fca8"; + private static final String gitCommitHash = "8d0c78b928ca21c63ad05b0ee7dbe608065d44d1"; //BEGIN_CLASS_HEADER //TODO JAVADOC really low priority, sorry @@ -142,7 +141,7 @@ public class WorkspaceServer extends JsonServerServlet { private static ThreadLocal _tempSyslog = new ThreadLocal<>(); private static ThreadLocal _tempConfig = new ThreadLocal<>(); private static ThreadLocal _tempStartupFailed = new ThreadLocal<>(); - private static ThreadLocal _tempAuth = new ThreadLocal<>(); + private static ThreadLocal _tempAuth = new ThreadLocal<>(); public WorkspaceServer() { // This deliberately replaces the constructor compiled by kb-sdk. If you recompile the @@ -196,29 +195,17 @@ private static AuthenticationHandler getAuth(final boolean silenceLogs) { if (cfg == null) { return t -> {throw new AuthException("failed to set up auth");}; } - final AuthConfig c = new AuthConfig(); - if (cfg.getAuth2URL().getProtocol().equals("http")) { - c.withAllowInsecureURLs(true); - sysLogger.logInfo("Warning - the Auth Service MKII url uses insecure http. " + - "https is recommended."); - } try { - final URL globusURL = cfg.getAuth2URL().toURI().resolve("api/legacy/globus").toURL(); - final URL kbaseURL = cfg.getAuth2URL().toURI() - .resolve("api/legacy/KBase/Sessions/Login").toURL(); - c.withGlobusAuthURL(globusURL).withKBaseAuthServerURL(kbaseURL); - } catch (URISyntaxException | MalformedURLException e) { + final AuthClient cli = AuthClient.from(cfg.getAuth2URL().toURI()); + _tempAuth.set(cli); + return token -> cli.validateToken(token); + } catch (URISyntaxException e) { sysLogger.logErr("Invalid Auth Service url: " + cfg.getAuth2URL()); _tempStartupFailed.set(true); return t -> {throw new AuthException("failed to set up auth");}; - } - try { - final ConfigurableAuthService cas = new ConfigurableAuthService(c); - _tempAuth.set(cas); - return token -> cas.validateToken(token); - } catch (IOException e) { + } catch (AuthException | IOException e) { sysLogger.logErr("Couldn't connect to authorization service at " + - c.getAuthServerURL() + " : " + e.getLocalizedMessage()); + cfg.getAuth2URL() + " : " + e.getLocalizedMessage()); sysLogger.logErr(e); _tempStartupFailed.set(true); return t -> {throw new AuthException("failed to set up auth");}; @@ -307,7 +294,7 @@ private static JsonServerSyslog getUserLogger(final boolean silenceLogs) { private WorkspaceInitResults initWorkspace( final KBaseWorkspaceConfig cfg, - final ConfigurableAuthService auth, + final AuthClient auth, final JsonServerSyslog logger) { setUpLogger(); setMaxRPCPackageSize(MAX_RPC_PACKAGE_SIZE); @@ -1766,6 +1753,7 @@ public Map status() { returnVal.put("dependencies", dstate); returnVal.put("version", VERSION); returnVal.put("git_url", GIT); + returnVal.put("git_commit", GitCommit.COMMIT); returnVal.put("freemem", Runtime.getRuntime().freeMemory()); returnVal.put("totalmem", Runtime.getRuntime().totalMemory()); returnVal.put("maxmem", Runtime.getRuntime().maxMemory()); diff --git a/src/us/kbase/workspace/database/AllUsers.java b/service/src/main/java/us/kbase/workspace/database/AllUsers.java similarity index 100% rename from src/us/kbase/workspace/database/AllUsers.java rename to service/src/main/java/us/kbase/workspace/database/AllUsers.java diff --git a/src/us/kbase/workspace/database/ByteArrayFileCacheManager.java b/service/src/main/java/us/kbase/workspace/database/ByteArrayFileCacheManager.java similarity index 100% rename from src/us/kbase/workspace/database/ByteArrayFileCacheManager.java rename to service/src/main/java/us/kbase/workspace/database/ByteArrayFileCacheManager.java diff --git a/src/us/kbase/workspace/database/CopyResult.java b/service/src/main/java/us/kbase/workspace/database/CopyResult.java similarity index 100% rename from src/us/kbase/workspace/database/CopyResult.java rename to service/src/main/java/us/kbase/workspace/database/CopyResult.java diff --git a/src/us/kbase/workspace/database/DependencyStatus.java b/service/src/main/java/us/kbase/workspace/database/DependencyStatus.java similarity index 100% rename from src/us/kbase/workspace/database/DependencyStatus.java rename to service/src/main/java/us/kbase/workspace/database/DependencyStatus.java diff --git a/src/us/kbase/workspace/database/DynamicConfig.java b/service/src/main/java/us/kbase/workspace/database/DynamicConfig.java similarity index 100% rename from src/us/kbase/workspace/database/DynamicConfig.java rename to service/src/main/java/us/kbase/workspace/database/DynamicConfig.java diff --git a/src/us/kbase/workspace/database/ListObjectsParameters.java b/service/src/main/java/us/kbase/workspace/database/ListObjectsParameters.java similarity index 100% rename from src/us/kbase/workspace/database/ListObjectsParameters.java rename to service/src/main/java/us/kbase/workspace/database/ListObjectsParameters.java diff --git a/src/us/kbase/workspace/database/MetadataUpdate.java b/service/src/main/java/us/kbase/workspace/database/MetadataUpdate.java similarity index 100% rename from src/us/kbase/workspace/database/MetadataUpdate.java rename to service/src/main/java/us/kbase/workspace/database/MetadataUpdate.java diff --git a/src/us/kbase/workspace/database/ModuleInfo.java b/service/src/main/java/us/kbase/workspace/database/ModuleInfo.java similarity index 100% rename from src/us/kbase/workspace/database/ModuleInfo.java rename to service/src/main/java/us/kbase/workspace/database/ModuleInfo.java diff --git a/src/us/kbase/workspace/database/ObjectIDNoWSNoVer.java b/service/src/main/java/us/kbase/workspace/database/ObjectIDNoWSNoVer.java similarity index 100% rename from src/us/kbase/workspace/database/ObjectIDNoWSNoVer.java rename to service/src/main/java/us/kbase/workspace/database/ObjectIDNoWSNoVer.java diff --git a/src/us/kbase/workspace/database/ObjectIDResolvedWS.java b/service/src/main/java/us/kbase/workspace/database/ObjectIDResolvedWS.java similarity index 100% rename from src/us/kbase/workspace/database/ObjectIDResolvedWS.java rename to service/src/main/java/us/kbase/workspace/database/ObjectIDResolvedWS.java diff --git a/src/us/kbase/workspace/database/ObjectIdentifier.java b/service/src/main/java/us/kbase/workspace/database/ObjectIdentifier.java similarity index 100% rename from src/us/kbase/workspace/database/ObjectIdentifier.java rename to service/src/main/java/us/kbase/workspace/database/ObjectIdentifier.java diff --git a/src/us/kbase/workspace/database/ObjectInfoWithModDate.java b/service/src/main/java/us/kbase/workspace/database/ObjectInfoWithModDate.java similarity index 100% rename from src/us/kbase/workspace/database/ObjectInfoWithModDate.java rename to service/src/main/java/us/kbase/workspace/database/ObjectInfoWithModDate.java diff --git a/src/us/kbase/workspace/database/ObjectInformation.java b/service/src/main/java/us/kbase/workspace/database/ObjectInformation.java similarity index 100% rename from src/us/kbase/workspace/database/ObjectInformation.java rename to service/src/main/java/us/kbase/workspace/database/ObjectInformation.java diff --git a/src/us/kbase/workspace/database/ObjectReferenceSet.java b/service/src/main/java/us/kbase/workspace/database/ObjectReferenceSet.java similarity index 100% rename from src/us/kbase/workspace/database/ObjectReferenceSet.java rename to service/src/main/java/us/kbase/workspace/database/ObjectReferenceSet.java diff --git a/src/us/kbase/workspace/database/ObjectResolver.java b/service/src/main/java/us/kbase/workspace/database/ObjectResolver.java similarity index 100% rename from src/us/kbase/workspace/database/ObjectResolver.java rename to service/src/main/java/us/kbase/workspace/database/ObjectResolver.java diff --git a/src/us/kbase/workspace/database/Permission.java b/service/src/main/java/us/kbase/workspace/database/Permission.java similarity index 100% rename from src/us/kbase/workspace/database/Permission.java rename to service/src/main/java/us/kbase/workspace/database/Permission.java diff --git a/src/us/kbase/workspace/database/PermissionSet.java b/service/src/main/java/us/kbase/workspace/database/PermissionSet.java similarity index 100% rename from src/us/kbase/workspace/database/PermissionSet.java rename to service/src/main/java/us/kbase/workspace/database/PermissionSet.java diff --git a/src/us/kbase/workspace/database/PermissionsCheckerFactory.java b/service/src/main/java/us/kbase/workspace/database/PermissionsCheckerFactory.java similarity index 100% rename from src/us/kbase/workspace/database/PermissionsCheckerFactory.java rename to service/src/main/java/us/kbase/workspace/database/PermissionsCheckerFactory.java diff --git a/src/us/kbase/workspace/database/RefLimit.java b/service/src/main/java/us/kbase/workspace/database/RefLimit.java similarity index 100% rename from src/us/kbase/workspace/database/RefLimit.java rename to service/src/main/java/us/kbase/workspace/database/RefLimit.java diff --git a/src/us/kbase/workspace/database/Reference.java b/service/src/main/java/us/kbase/workspace/database/Reference.java similarity index 100% rename from src/us/kbase/workspace/database/Reference.java rename to service/src/main/java/us/kbase/workspace/database/Reference.java diff --git a/src/us/kbase/workspace/database/ResolvedObjectID.java b/service/src/main/java/us/kbase/workspace/database/ResolvedObjectID.java similarity index 100% rename from src/us/kbase/workspace/database/ResolvedObjectID.java rename to service/src/main/java/us/kbase/workspace/database/ResolvedObjectID.java diff --git a/src/us/kbase/workspace/database/ResolvedObjectIDNoVer.java b/service/src/main/java/us/kbase/workspace/database/ResolvedObjectIDNoVer.java similarity index 100% rename from src/us/kbase/workspace/database/ResolvedObjectIDNoVer.java rename to service/src/main/java/us/kbase/workspace/database/ResolvedObjectIDNoVer.java diff --git a/src/us/kbase/workspace/database/ResolvedSaveObject.java b/service/src/main/java/us/kbase/workspace/database/ResolvedSaveObject.java similarity index 100% rename from src/us/kbase/workspace/database/ResolvedSaveObject.java rename to service/src/main/java/us/kbase/workspace/database/ResolvedSaveObject.java diff --git a/src/us/kbase/workspace/database/ResolvedWorkspaceID.java b/service/src/main/java/us/kbase/workspace/database/ResolvedWorkspaceID.java similarity index 100% rename from src/us/kbase/workspace/database/ResolvedWorkspaceID.java rename to service/src/main/java/us/kbase/workspace/database/ResolvedWorkspaceID.java diff --git a/src/us/kbase/workspace/database/ResourceUsageConfigurationBuilder.java b/service/src/main/java/us/kbase/workspace/database/ResourceUsageConfigurationBuilder.java similarity index 100% rename from src/us/kbase/workspace/database/ResourceUsageConfigurationBuilder.java rename to service/src/main/java/us/kbase/workspace/database/ResourceUsageConfigurationBuilder.java diff --git a/src/us/kbase/workspace/database/TypeAndReference.java b/service/src/main/java/us/kbase/workspace/database/TypeAndReference.java similarity index 100% rename from src/us/kbase/workspace/database/TypeAndReference.java rename to service/src/main/java/us/kbase/workspace/database/TypeAndReference.java diff --git a/src/us/kbase/workspace/database/Types.java b/service/src/main/java/us/kbase/workspace/database/Types.java similarity index 100% rename from src/us/kbase/workspace/database/Types.java rename to service/src/main/java/us/kbase/workspace/database/Types.java diff --git a/src/us/kbase/workspace/database/UncheckedUserMetadata.java b/service/src/main/java/us/kbase/workspace/database/UncheckedUserMetadata.java similarity index 100% rename from src/us/kbase/workspace/database/UncheckedUserMetadata.java rename to service/src/main/java/us/kbase/workspace/database/UncheckedUserMetadata.java diff --git a/src/us/kbase/workspace/database/User.java b/service/src/main/java/us/kbase/workspace/database/User.java similarity index 100% rename from src/us/kbase/workspace/database/User.java rename to service/src/main/java/us/kbase/workspace/database/User.java diff --git a/src/us/kbase/workspace/database/UserWorkspaceIDs.java b/service/src/main/java/us/kbase/workspace/database/UserWorkspaceIDs.java similarity index 100% rename from src/us/kbase/workspace/database/UserWorkspaceIDs.java rename to service/src/main/java/us/kbase/workspace/database/UserWorkspaceIDs.java diff --git a/src/us/kbase/workspace/database/Util.java b/service/src/main/java/us/kbase/workspace/database/Util.java similarity index 100% rename from src/us/kbase/workspace/database/Util.java rename to service/src/main/java/us/kbase/workspace/database/Util.java diff --git a/src/us/kbase/workspace/database/Workspace.java b/service/src/main/java/us/kbase/workspace/database/Workspace.java similarity index 99% rename from src/us/kbase/workspace/database/Workspace.java rename to service/src/main/java/us/kbase/workspace/database/Workspace.java index a0b843f2b..f2513dccb 100644 --- a/src/us/kbase/workspace/database/Workspace.java +++ b/service/src/main/java/us/kbase/workspace/database/Workspace.java @@ -1244,7 +1244,7 @@ public List> getReferencingObjects( return ret; } - /** @deprecated */ + @Deprecated public List getReferencingObjectCounts( final WorkspaceUser user, final List loi) throws WorkspaceCommunicationException, InaccessibleObjectException, diff --git a/src/us/kbase/workspace/database/WorkspaceDatabase.java b/service/src/main/java/us/kbase/workspace/database/WorkspaceDatabase.java similarity index 99% rename from src/us/kbase/workspace/database/WorkspaceDatabase.java rename to service/src/main/java/us/kbase/workspace/database/WorkspaceDatabase.java index 53fc2a095..9f2873c03 100644 --- a/src/us/kbase/workspace/database/WorkspaceDatabase.java +++ b/service/src/main/java/us/kbase/workspace/database/WorkspaceDatabase.java @@ -442,7 +442,7 @@ Map getObjectIncomingReferences( Set objs) throws NoSuchObjectException, WorkspaceCommunicationException; - /** @deprecated */ + @Deprecated Map getReferencingObjectCounts( Set objects) throws WorkspaceCommunicationException, NoSuchObjectException; diff --git a/src/us/kbase/workspace/database/WorkspaceIdentifier.java b/service/src/main/java/us/kbase/workspace/database/WorkspaceIdentifier.java similarity index 100% rename from src/us/kbase/workspace/database/WorkspaceIdentifier.java rename to service/src/main/java/us/kbase/workspace/database/WorkspaceIdentifier.java diff --git a/src/us/kbase/workspace/database/WorkspaceInformation.java b/service/src/main/java/us/kbase/workspace/database/WorkspaceInformation.java similarity index 100% rename from src/us/kbase/workspace/database/WorkspaceInformation.java rename to service/src/main/java/us/kbase/workspace/database/WorkspaceInformation.java diff --git a/src/us/kbase/workspace/database/WorkspaceObjectData.java b/service/src/main/java/us/kbase/workspace/database/WorkspaceObjectData.java similarity index 100% rename from src/us/kbase/workspace/database/WorkspaceObjectData.java rename to service/src/main/java/us/kbase/workspace/database/WorkspaceObjectData.java diff --git a/src/us/kbase/workspace/database/WorkspaceSaveObject.java b/service/src/main/java/us/kbase/workspace/database/WorkspaceSaveObject.java similarity index 100% rename from src/us/kbase/workspace/database/WorkspaceSaveObject.java rename to service/src/main/java/us/kbase/workspace/database/WorkspaceSaveObject.java diff --git a/src/us/kbase/workspace/database/WorkspaceUser.java b/service/src/main/java/us/kbase/workspace/database/WorkspaceUser.java similarity index 100% rename from src/us/kbase/workspace/database/WorkspaceUser.java rename to service/src/main/java/us/kbase/workspace/database/WorkspaceUser.java diff --git a/src/us/kbase/workspace/database/WorkspaceUserMetadata.java b/service/src/main/java/us/kbase/workspace/database/WorkspaceUserMetadata.java similarity index 100% rename from src/us/kbase/workspace/database/WorkspaceUserMetadata.java rename to service/src/main/java/us/kbase/workspace/database/WorkspaceUserMetadata.java diff --git a/src/us/kbase/workspace/database/exceptions/CorruptWorkspaceDBException.java b/service/src/main/java/us/kbase/workspace/database/exceptions/CorruptWorkspaceDBException.java similarity index 100% rename from src/us/kbase/workspace/database/exceptions/CorruptWorkspaceDBException.java rename to service/src/main/java/us/kbase/workspace/database/exceptions/CorruptWorkspaceDBException.java diff --git a/src/us/kbase/workspace/database/exceptions/DeletedObjectException.java b/service/src/main/java/us/kbase/workspace/database/exceptions/DeletedObjectException.java similarity index 100% rename from src/us/kbase/workspace/database/exceptions/DeletedObjectException.java rename to service/src/main/java/us/kbase/workspace/database/exceptions/DeletedObjectException.java diff --git a/src/us/kbase/workspace/database/exceptions/ErrorOr.java b/service/src/main/java/us/kbase/workspace/database/exceptions/ErrorOr.java similarity index 100% rename from src/us/kbase/workspace/database/exceptions/ErrorOr.java rename to service/src/main/java/us/kbase/workspace/database/exceptions/ErrorOr.java diff --git a/src/us/kbase/workspace/database/exceptions/ErrorType.java b/service/src/main/java/us/kbase/workspace/database/exceptions/ErrorType.java similarity index 100% rename from src/us/kbase/workspace/database/exceptions/ErrorType.java rename to service/src/main/java/us/kbase/workspace/database/exceptions/ErrorType.java diff --git a/src/us/kbase/workspace/database/exceptions/InaccessibleObjectException.java b/service/src/main/java/us/kbase/workspace/database/exceptions/InaccessibleObjectException.java similarity index 100% rename from src/us/kbase/workspace/database/exceptions/InaccessibleObjectException.java rename to service/src/main/java/us/kbase/workspace/database/exceptions/InaccessibleObjectException.java diff --git a/src/us/kbase/workspace/database/exceptions/NoObjectDataException.java b/service/src/main/java/us/kbase/workspace/database/exceptions/NoObjectDataException.java similarity index 100% rename from src/us/kbase/workspace/database/exceptions/NoObjectDataException.java rename to service/src/main/java/us/kbase/workspace/database/exceptions/NoObjectDataException.java diff --git a/src/us/kbase/workspace/database/exceptions/NoSuchObjectException.java b/service/src/main/java/us/kbase/workspace/database/exceptions/NoSuchObjectException.java similarity index 100% rename from src/us/kbase/workspace/database/exceptions/NoSuchObjectException.java rename to service/src/main/java/us/kbase/workspace/database/exceptions/NoSuchObjectException.java diff --git a/src/us/kbase/workspace/database/exceptions/NoSuchReferenceException.java b/service/src/main/java/us/kbase/workspace/database/exceptions/NoSuchReferenceException.java similarity index 100% rename from src/us/kbase/workspace/database/exceptions/NoSuchReferenceException.java rename to service/src/main/java/us/kbase/workspace/database/exceptions/NoSuchReferenceException.java diff --git a/src/us/kbase/workspace/database/exceptions/NoSuchWorkspaceException.java b/service/src/main/java/us/kbase/workspace/database/exceptions/NoSuchWorkspaceException.java similarity index 100% rename from src/us/kbase/workspace/database/exceptions/NoSuchWorkspaceException.java rename to service/src/main/java/us/kbase/workspace/database/exceptions/NoSuchWorkspaceException.java diff --git a/src/us/kbase/workspace/database/exceptions/PreExistingWorkspaceException.java b/service/src/main/java/us/kbase/workspace/database/exceptions/PreExistingWorkspaceException.java similarity index 100% rename from src/us/kbase/workspace/database/exceptions/PreExistingWorkspaceException.java rename to service/src/main/java/us/kbase/workspace/database/exceptions/PreExistingWorkspaceException.java diff --git a/src/us/kbase/workspace/database/exceptions/WorkspaceCommunicationException.java b/service/src/main/java/us/kbase/workspace/database/exceptions/WorkspaceCommunicationException.java similarity index 100% rename from src/us/kbase/workspace/database/exceptions/WorkspaceCommunicationException.java rename to service/src/main/java/us/kbase/workspace/database/exceptions/WorkspaceCommunicationException.java diff --git a/src/us/kbase/workspace/database/exceptions/WorkspaceDBException.java b/service/src/main/java/us/kbase/workspace/database/exceptions/WorkspaceDBException.java similarity index 100% rename from src/us/kbase/workspace/database/exceptions/WorkspaceDBException.java rename to service/src/main/java/us/kbase/workspace/database/exceptions/WorkspaceDBException.java diff --git a/src/us/kbase/workspace/database/exceptions/WorkspaceDBInitializationException.java b/service/src/main/java/us/kbase/workspace/database/exceptions/WorkspaceDBInitializationException.java similarity index 100% rename from src/us/kbase/workspace/database/exceptions/WorkspaceDBInitializationException.java rename to service/src/main/java/us/kbase/workspace/database/exceptions/WorkspaceDBInitializationException.java diff --git a/src/us/kbase/workspace/database/mongo/BlobStore.java b/service/src/main/java/us/kbase/workspace/database/mongo/BlobStore.java similarity index 100% rename from src/us/kbase/workspace/database/mongo/BlobStore.java rename to service/src/main/java/us/kbase/workspace/database/mongo/BlobStore.java diff --git a/src/us/kbase/workspace/database/mongo/CollectionNames.java b/service/src/main/java/us/kbase/workspace/database/mongo/CollectionNames.java similarity index 100% rename from src/us/kbase/workspace/database/mongo/CollectionNames.java rename to service/src/main/java/us/kbase/workspace/database/mongo/CollectionNames.java diff --git a/src/us/kbase/workspace/database/mongo/Fields.java b/service/src/main/java/us/kbase/workspace/database/mongo/Fields.java similarity index 100% rename from src/us/kbase/workspace/database/mongo/Fields.java rename to service/src/main/java/us/kbase/workspace/database/mongo/Fields.java diff --git a/src/us/kbase/workspace/database/mongo/GridFSBlobStore.java b/service/src/main/java/us/kbase/workspace/database/mongo/GridFSBlobStore.java similarity index 100% rename from src/us/kbase/workspace/database/mongo/GridFSBlobStore.java rename to service/src/main/java/us/kbase/workspace/database/mongo/GridFSBlobStore.java diff --git a/src/us/kbase/workspace/database/mongo/IDName.java b/service/src/main/java/us/kbase/workspace/database/mongo/IDName.java similarity index 100% rename from src/us/kbase/workspace/database/mongo/IDName.java rename to service/src/main/java/us/kbase/workspace/database/mongo/IDName.java diff --git a/src/us/kbase/workspace/database/mongo/MongoWorkspaceDB.java b/service/src/main/java/us/kbase/workspace/database/mongo/MongoWorkspaceDB.java similarity index 99% rename from src/us/kbase/workspace/database/mongo/MongoWorkspaceDB.java rename to service/src/main/java/us/kbase/workspace/database/mongo/MongoWorkspaceDB.java index 9aba5ad06..8f5b6f9b2 100644 --- a/src/us/kbase/workspace/database/mongo/MongoWorkspaceDB.java +++ b/service/src/main/java/us/kbase/workspace/database/mongo/MongoWorkspaceDB.java @@ -2734,8 +2734,8 @@ public Map> getReferencingObjects( private static final Set FLDS_REF_CNT = newHashSet( Fields.OBJ_ID, Fields.OBJ_NAME, Fields.OBJ_DEL, Fields.OBJ_VCNT, Fields.OBJ_REFCOUNTS); - /** @deprecated */ @Override + @Deprecated public Map getReferencingObjectCounts( final Set objects) throws WorkspaceCommunicationException, NoSuchObjectException { diff --git a/src/us/kbase/workspace/database/mongo/ObjectIDResolvedWSNoVer.java b/service/src/main/java/us/kbase/workspace/database/mongo/ObjectIDResolvedWSNoVer.java similarity index 100% rename from src/us/kbase/workspace/database/mongo/ObjectIDResolvedWSNoVer.java rename to service/src/main/java/us/kbase/workspace/database/mongo/ObjectIDResolvedWSNoVer.java diff --git a/src/us/kbase/workspace/database/mongo/ObjectInfoUtils.java b/service/src/main/java/us/kbase/workspace/database/mongo/ObjectInfoUtils.java similarity index 100% rename from src/us/kbase/workspace/database/mongo/ObjectInfoUtils.java rename to service/src/main/java/us/kbase/workspace/database/mongo/ObjectInfoUtils.java diff --git a/src/us/kbase/workspace/database/mongo/ObjectLister.java b/service/src/main/java/us/kbase/workspace/database/mongo/ObjectLister.java similarity index 100% rename from src/us/kbase/workspace/database/mongo/ObjectLister.java rename to service/src/main/java/us/kbase/workspace/database/mongo/ObjectLister.java diff --git a/src/us/kbase/workspace/database/mongo/ObjectSavePackage.java b/service/src/main/java/us/kbase/workspace/database/mongo/ObjectSavePackage.java similarity index 100% rename from src/us/kbase/workspace/database/mongo/ObjectSavePackage.java rename to service/src/main/java/us/kbase/workspace/database/mongo/ObjectSavePackage.java diff --git a/src/us/kbase/workspace/database/mongo/QueryMethods.java b/service/src/main/java/us/kbase/workspace/database/mongo/QueryMethods.java similarity index 100% rename from src/us/kbase/workspace/database/mongo/QueryMethods.java rename to service/src/main/java/us/kbase/workspace/database/mongo/QueryMethods.java diff --git a/src/us/kbase/workspace/database/mongo/S3BlobStore.java b/service/src/main/java/us/kbase/workspace/database/mongo/S3BlobStore.java similarity index 100% rename from src/us/kbase/workspace/database/mongo/S3BlobStore.java rename to service/src/main/java/us/kbase/workspace/database/mongo/S3BlobStore.java diff --git a/src/us/kbase/workspace/database/mongo/S3ClientWithPresign.java b/service/src/main/java/us/kbase/workspace/database/mongo/S3ClientWithPresign.java similarity index 100% rename from src/us/kbase/workspace/database/mongo/S3ClientWithPresign.java rename to service/src/main/java/us/kbase/workspace/database/mongo/S3ClientWithPresign.java diff --git a/src/us/kbase/workspace/database/mongo/SchemaUpdater.java b/service/src/main/java/us/kbase/workspace/database/mongo/SchemaUpdater.java similarity index 100% rename from src/us/kbase/workspace/database/mongo/SchemaUpdater.java rename to service/src/main/java/us/kbase/workspace/database/mongo/SchemaUpdater.java diff --git a/src/us/kbase/workspace/database/mongo/exceptions/BlobStoreAuthorizationException.java b/service/src/main/java/us/kbase/workspace/database/mongo/exceptions/BlobStoreAuthorizationException.java similarity index 100% rename from src/us/kbase/workspace/database/mongo/exceptions/BlobStoreAuthorizationException.java rename to service/src/main/java/us/kbase/workspace/database/mongo/exceptions/BlobStoreAuthorizationException.java diff --git a/src/us/kbase/workspace/database/mongo/exceptions/BlobStoreCommunicationException.java b/service/src/main/java/us/kbase/workspace/database/mongo/exceptions/BlobStoreCommunicationException.java similarity index 100% rename from src/us/kbase/workspace/database/mongo/exceptions/BlobStoreCommunicationException.java rename to service/src/main/java/us/kbase/workspace/database/mongo/exceptions/BlobStoreCommunicationException.java diff --git a/src/us/kbase/workspace/database/mongo/exceptions/BlobStoreException.java b/service/src/main/java/us/kbase/workspace/database/mongo/exceptions/BlobStoreException.java similarity index 100% rename from src/us/kbase/workspace/database/mongo/exceptions/BlobStoreException.java rename to service/src/main/java/us/kbase/workspace/database/mongo/exceptions/BlobStoreException.java diff --git a/src/us/kbase/workspace/database/mongo/exceptions/NoSuchBlobException.java b/service/src/main/java/us/kbase/workspace/database/mongo/exceptions/NoSuchBlobException.java similarity index 100% rename from src/us/kbase/workspace/database/mongo/exceptions/NoSuchBlobException.java rename to service/src/main/java/us/kbase/workspace/database/mongo/exceptions/NoSuchBlobException.java diff --git a/src/us/kbase/workspace/database/provenance/Common.java b/service/src/main/java/us/kbase/workspace/database/provenance/Common.java similarity index 97% rename from src/us/kbase/workspace/database/provenance/Common.java rename to service/src/main/java/us/kbase/workspace/database/provenance/Common.java index 325361e49..0a55c1f05 100644 --- a/src/us/kbase/workspace/database/provenance/Common.java +++ b/service/src/main/java/us/kbase/workspace/database/provenance/Common.java @@ -19,7 +19,7 @@ class Common { private Common() {} static String processString(final String input) { - return isNullOrWhitespace(input) ? null : input.strip(); + return isNullOrWhitespace(input) ? null : input.trim(); } static URL processURL(final String url, final String name) { diff --git a/src/us/kbase/workspace/database/provenance/ExternalData.java b/service/src/main/java/us/kbase/workspace/database/provenance/ExternalData.java similarity index 100% rename from src/us/kbase/workspace/database/provenance/ExternalData.java rename to service/src/main/java/us/kbase/workspace/database/provenance/ExternalData.java diff --git a/src/us/kbase/workspace/database/provenance/Provenance.java b/service/src/main/java/us/kbase/workspace/database/provenance/Provenance.java similarity index 100% rename from src/us/kbase/workspace/database/provenance/Provenance.java rename to service/src/main/java/us/kbase/workspace/database/provenance/Provenance.java diff --git a/src/us/kbase/workspace/database/provenance/ProvenanceAction.java b/service/src/main/java/us/kbase/workspace/database/provenance/ProvenanceAction.java similarity index 100% rename from src/us/kbase/workspace/database/provenance/ProvenanceAction.java rename to service/src/main/java/us/kbase/workspace/database/provenance/ProvenanceAction.java diff --git a/src/us/kbase/workspace/database/provenance/SubAction.java b/service/src/main/java/us/kbase/workspace/database/provenance/SubAction.java similarity index 100% rename from src/us/kbase/workspace/database/provenance/SubAction.java rename to service/src/main/java/us/kbase/workspace/database/provenance/SubAction.java diff --git a/src/us/kbase/workspace/database/refsearch/ReferenceGraphSearch.java b/service/src/main/java/us/kbase/workspace/database/refsearch/ReferenceGraphSearch.java similarity index 100% rename from src/us/kbase/workspace/database/refsearch/ReferenceGraphSearch.java rename to service/src/main/java/us/kbase/workspace/database/refsearch/ReferenceGraphSearch.java diff --git a/src/us/kbase/workspace/database/refsearch/ReferenceGraphTopologyProvider.java b/service/src/main/java/us/kbase/workspace/database/refsearch/ReferenceGraphTopologyProvider.java similarity index 100% rename from src/us/kbase/workspace/database/refsearch/ReferenceGraphTopologyProvider.java rename to service/src/main/java/us/kbase/workspace/database/refsearch/ReferenceGraphTopologyProvider.java diff --git a/src/us/kbase/workspace/database/refsearch/ReferenceProviderException.java b/service/src/main/java/us/kbase/workspace/database/refsearch/ReferenceProviderException.java similarity index 100% rename from src/us/kbase/workspace/database/refsearch/ReferenceProviderException.java rename to service/src/main/java/us/kbase/workspace/database/refsearch/ReferenceProviderException.java diff --git a/src/us/kbase/workspace/database/refsearch/ReferenceSearchFailedException.java b/service/src/main/java/us/kbase/workspace/database/refsearch/ReferenceSearchFailedException.java similarity index 100% rename from src/us/kbase/workspace/database/refsearch/ReferenceSearchFailedException.java rename to service/src/main/java/us/kbase/workspace/database/refsearch/ReferenceSearchFailedException.java diff --git a/src/us/kbase/workspace/database/refsearch/ReferenceSearchMaximumSizeExceededException.java b/service/src/main/java/us/kbase/workspace/database/refsearch/ReferenceSearchMaximumSizeExceededException.java similarity index 100% rename from src/us/kbase/workspace/database/refsearch/ReferenceSearchMaximumSizeExceededException.java rename to service/src/main/java/us/kbase/workspace/database/refsearch/ReferenceSearchMaximumSizeExceededException.java diff --git a/src/us/kbase/workspace/database/refsearch/ReferenceSearchTree.java b/service/src/main/java/us/kbase/workspace/database/refsearch/ReferenceSearchTree.java similarity index 100% rename from src/us/kbase/workspace/database/refsearch/ReferenceSearchTree.java rename to service/src/main/java/us/kbase/workspace/database/refsearch/ReferenceSearchTree.java diff --git a/src/us/kbase/workspace/database/refsearch/ReferenceTreeNode.java b/service/src/main/java/us/kbase/workspace/database/refsearch/ReferenceTreeNode.java similarity index 100% rename from src/us/kbase/workspace/database/refsearch/ReferenceTreeNode.java rename to service/src/main/java/us/kbase/workspace/database/refsearch/ReferenceTreeNode.java diff --git a/src/us/kbase/workspace/docserver/DocServer.java b/service/src/main/java/us/kbase/workspace/docserver/DocServer.java similarity index 85% rename from src/us/kbase/workspace/docserver/DocServer.java rename to service/src/main/java/us/kbase/workspace/docserver/DocServer.java index 0570c0081..ae8bed97c 100644 --- a/src/us/kbase/workspace/docserver/DocServer.java +++ b/service/src/main/java/us/kbase/workspace/docserver/DocServer.java @@ -15,6 +15,7 @@ import org.eclipse.jetty.server.Server; import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.servlet.ServletHolder; +import org.productivity.java.syslog4j.SyslogIF; import com.google.common.io.Files; @@ -34,10 +35,11 @@ public class DocServer extends HttpServlet { /** * The name of the service that this document server is serving documents * for. This name will be used to find the appropriate section of the - * KBase deploy.cfg configuration file if the name is not specified in the - * environment. + * KBase deploy.cfg configuration file. */ - public static final String DEFAULT_COMPANION_SERVICE_NAME = "Workspace"; + public static final String COMPANION_SERVICE_NAME = "Workspace"; + // TODO CONFIG configure directly vs going through JsonSererServlet + /** * The name of this document server, used for logging purposes. */ @@ -56,10 +58,8 @@ public class DocServer extends HttpServlet { private static final FileNameMap FILE_NAME_MAP = URLConnection.getFileNameMap(); - private static final String DONT_TRUST_X_IP_HEADERS = - "dont_trust_x_ip_headers"; - private static final String DONT_TRUST_X_IP_HEADERS2 = - "dont-trust-x-ip-headers"; + private static final String DONT_TRUST_X_IP_HEADERS = "dont_trust_x_ip_headers"; + private static final String DONT_TRUST_X_IP_HEADERS2 = "dont-trust-x-ip-headers"; private static final String STRING_TRUE = "true"; private final String docsLoc; @@ -83,18 +83,13 @@ public class DocServer extends HttpServlet { public DocServer() { //TODO JERSEY switch to a jersey endpoint when that's available, ditch logger, etc. Pretty big rewrite/simplification super(); - /* really should try and get the companion service name from the env - * here, but not worth the effort - */ - JsonServerSyslog templogger = new JsonServerSyslog( - DEFAULT_COMPANION_SERVICE_NAME, JsonServerServlet.KB_DEP, - JsonServerSyslog.LOG_LEVEL_INFO, false); - if (sysLogOut != null) { - templogger.changeOutput(sysLogOut); - } - // getConfig() gets the service name from the env if it exists + JsonServerSyslog.setStaticUseSyslog(false); + final JsonServerSyslog templogger = getLogger(COMPANION_SERVICE_NAME, sysLogOut); + + // getConfig() gets the service name from the env if it exists which is bad + // since the Workspace doesn't. Need to redo configuration handling at some point final Map config = JsonServerServlet.getConfig( - DEFAULT_COMPANION_SERVICE_NAME, templogger); + COMPANION_SERVICE_NAME, templogger); String serverName = config.get(CFG_SERVICE_NAME); if (serverName == null || serverName.isEmpty()) { @@ -110,16 +105,34 @@ public DocServer() { docsLoc = dlog; } } - logger = new JsonServerSyslog(serverName, JsonServerServlet.KB_DEP, - JsonServerSyslog.LOG_LEVEL_INFO, false); - if (sysLogOut != null) { - logger.changeOutput(sysLogOut); - } + logger = getLogger(serverName, sysLogOut); this.trustX_IPHeaders = !STRING_TRUE.equals(config.get(DONT_TRUST_X_IP_HEADERS)) && !STRING_TRUE.equals(config.get(DONT_TRUST_X_IP_HEADERS2)); } + private JsonServerSyslog getLogger( + final String serverName, + final SyslogOutput output) { + final JsonServerSyslog logger = new JsonServerSyslog( + serverName, JsonServerServlet.KB_DEP, JsonServerSyslog.LOG_LEVEL_INFO, false); + if (output == null) { + logger.changeOutput(new SyslogOutput() { + // this is manually tested + @Override + public void logToSystem( + final SyslogIF log, + final int level, + final String message) { + System.out.println(message); + } + }); + } else { + logger.changeOutput(output); + } + return logger; + } + @Override protected void doOptions( final HttpServletRequest request, diff --git a/src/us/kbase/workspace/exceptions/WorkspaceAuthorizationException.java b/service/src/main/java/us/kbase/workspace/exceptions/WorkspaceAuthorizationException.java similarity index 100% rename from src/us/kbase/workspace/exceptions/WorkspaceAuthorizationException.java rename to service/src/main/java/us/kbase/workspace/exceptions/WorkspaceAuthorizationException.java diff --git a/src/us/kbase/workspace/exceptions/WorkspaceException.java b/service/src/main/java/us/kbase/workspace/exceptions/WorkspaceException.java similarity index 100% rename from src/us/kbase/workspace/exceptions/WorkspaceException.java rename to service/src/main/java/us/kbase/workspace/exceptions/WorkspaceException.java diff --git a/service/src/main/java/us/kbase/workspace/gitcommit/GitCommit.java b/service/src/main/java/us/kbase/workspace/gitcommit/GitCommit.java new file mode 100644 index 000000000..cc030f624 --- /dev/null +++ b/service/src/main/java/us/kbase/workspace/gitcommit/GitCommit.java @@ -0,0 +1,38 @@ +package us.kbase.workspace.gitcommit; + +import java.io.InputStream; +import java.util.Scanner; + +/** The Git commit from which the service was built. Expects a file called "gitcommit" in the same + * directory as the class file which contains the commit hash. + * + * If the file is missing, the Git commit will be replaced with an error message. + * @author gaprice@lbl.gov + * + */ +public class GitCommit { + + // can't really test this easily since the file must be baked into the jar or war, + // just test manually + + /** The Git commit from which the service was built. */ + public static final String COMMIT; + + private static final String COMMIT_FILE_NAME = "gitcommit"; + + static { + final InputStream is = GitCommit.class.getResourceAsStream(COMMIT_FILE_NAME); + final String commit; + if (is == null) { + commit = "Missing git commit file " + COMMIT_FILE_NAME + + ", should be in " + GitCommit.class.getPackage().getName(); + } else { + final Scanner s = new Scanner(is); + s.useDelimiter("\\A"); + commit = s.hasNext() ? s.next() : ""; + s.close(); + } + COMMIT = commit.trim(); + } + +} diff --git a/src/us/kbase/workspace/kbase/ArgUtils.java b/service/src/main/java/us/kbase/workspace/kbase/ArgUtils.java similarity index 100% rename from src/us/kbase/workspace/kbase/ArgUtils.java rename to service/src/main/java/us/kbase/workspace/kbase/ArgUtils.java diff --git a/src/us/kbase/workspace/kbase/BackendType.java b/service/src/main/java/us/kbase/workspace/kbase/BackendType.java similarity index 100% rename from src/us/kbase/workspace/kbase/BackendType.java rename to service/src/main/java/us/kbase/workspace/kbase/BackendType.java diff --git a/src/us/kbase/workspace/kbase/BytestreamIdHandlerFactory.java b/service/src/main/java/us/kbase/workspace/kbase/BytestreamIdHandlerFactory.java similarity index 100% rename from src/us/kbase/workspace/kbase/BytestreamIdHandlerFactory.java rename to service/src/main/java/us/kbase/workspace/kbase/BytestreamIdHandlerFactory.java diff --git a/src/us/kbase/workspace/kbase/DelegatingTypeProvider.java b/service/src/main/java/us/kbase/workspace/kbase/DelegatingTypeProvider.java similarity index 100% rename from src/us/kbase/workspace/kbase/DelegatingTypeProvider.java rename to service/src/main/java/us/kbase/workspace/kbase/DelegatingTypeProvider.java diff --git a/src/us/kbase/workspace/kbase/HandleIdHandlerFactory.java b/service/src/main/java/us/kbase/workspace/kbase/HandleIdHandlerFactory.java similarity index 100% rename from src/us/kbase/workspace/kbase/HandleIdHandlerFactory.java rename to service/src/main/java/us/kbase/workspace/kbase/HandleIdHandlerFactory.java diff --git a/src/us/kbase/workspace/kbase/IdentifierUtils.java b/service/src/main/java/us/kbase/workspace/kbase/IdentifierUtils.java similarity index 100% rename from src/us/kbase/workspace/kbase/IdentifierUtils.java rename to service/src/main/java/us/kbase/workspace/kbase/IdentifierUtils.java diff --git a/src/us/kbase/workspace/kbase/InitWorkspaceServer.java b/service/src/main/java/us/kbase/workspace/kbase/InitWorkspaceServer.java similarity index 98% rename from src/us/kbase/workspace/kbase/InitWorkspaceServer.java rename to service/src/main/java/us/kbase/workspace/kbase/InitWorkspaceServer.java index 6d4f66cdb..a1121bfd4 100644 --- a/src/us/kbase/workspace/kbase/InitWorkspaceServer.java +++ b/service/src/main/java/us/kbase/workspace/kbase/InitWorkspaceServer.java @@ -33,7 +33,7 @@ import us.kbase.abstracthandle.AbstractHandleClient; import us.kbase.auth.AuthException; import us.kbase.auth.AuthToken; -import us.kbase.auth.ConfigurableAuthService; +import us.kbase.auth.client.AuthClient; import us.kbase.common.service.JsonClientException; import us.kbase.common.service.UnauthorizedException; import us.kbase.sampleservice.SampleServiceClient; @@ -142,7 +142,7 @@ public static void setMaximumUniqueIdCountForTests(final int count) { public static WorkspaceInitResults initWorkspaceServer( final KBaseWorkspaceConfig cfg, - final ConfigurableAuthService auth, + final AuthClient auth, final InitReporter rep) { final TempFilesManager tfm = initTempFilesManager(cfg.getTempDir(), rep); @@ -220,7 +220,7 @@ private static AdministratorHandler getAdminHandler( private static WorkspaceInitResults buildWorkspace( final KBaseWorkspaceConfig cfg, - final ConfigurableAuthService auth, + final AuthClient auth, final AbstractHandleClient hsc, final TempFilesManager tfm, final InitReporter rep) // DO NOT use the rep to report failures. Throw instead. @@ -349,7 +349,7 @@ public WorkspaceClient getClient(final URL workspaceURL) private static BytestreamIdHandlerFactory getShockIdHandlerFactory( final KBaseWorkspaceConfig cfg, - final ConfigurableAuthService auth) + final AuthClient auth) throws WorkspaceInitException { if (cfg.getBytestreamURL() == null) { return new BytestreamIdHandlerFactory(null, null); @@ -376,7 +376,7 @@ public BasicShockClient clone(final BasicShockClient source) private static SampleIdHandlerFactory getSampleIdHandlerFactory( final KBaseWorkspaceConfig cfg, - final ConfigurableAuthService auth, + final AuthClient auth, final InitReporter rep) // DO NOT use the rep to report failures. Throw instead. throws WorkspaceInitException { if (cfg.getSampleServiceURL() == null) { @@ -479,7 +479,7 @@ private static AuthToken getKBaseToken( final String user, final String token, final String source, - final ConfigurableAuthService auth) + final AuthClient auth) throws WorkspaceInitException { final AuthToken t = getToken(token, auth, source); if (!t.getUserName().equals(user)) { @@ -493,7 +493,7 @@ private static AuthToken getKBaseToken( private static AuthToken getToken( final String token, - final ConfigurableAuthService auth, + final AuthClient auth, final String source) throws WorkspaceInitException { if (token == null) { @@ -568,7 +568,7 @@ private static TempFilesManager initTempFilesManager( private static AuthToken getHandleToken( final KBaseWorkspaceConfig cfg, final InitReporter rep, - final ConfigurableAuthService auth) { + final AuthClient auth) { try { return auth.validateToken(cfg.getHandleServiceToken()); } catch (AuthException e) { diff --git a/src/us/kbase/workspace/kbase/KBasePermissions.java b/service/src/main/java/us/kbase/workspace/kbase/KBasePermissions.java similarity index 100% rename from src/us/kbase/workspace/kbase/KBasePermissions.java rename to service/src/main/java/us/kbase/workspace/kbase/KBasePermissions.java diff --git a/src/us/kbase/workspace/kbase/KBaseWorkspaceConfig.java b/service/src/main/java/us/kbase/workspace/kbase/KBaseWorkspaceConfig.java similarity index 100% rename from src/us/kbase/workspace/kbase/KBaseWorkspaceConfig.java rename to service/src/main/java/us/kbase/workspace/kbase/KBaseWorkspaceConfig.java diff --git a/src/us/kbase/workspace/kbase/LocalTypeServerMethods.java b/service/src/main/java/us/kbase/workspace/kbase/LocalTypeServerMethods.java similarity index 100% rename from src/us/kbase/workspace/kbase/LocalTypeServerMethods.java rename to service/src/main/java/us/kbase/workspace/kbase/LocalTypeServerMethods.java diff --git a/src/us/kbase/workspace/kbase/SampleIdHandlerFactory.java b/service/src/main/java/us/kbase/workspace/kbase/SampleIdHandlerFactory.java similarity index 100% rename from src/us/kbase/workspace/kbase/SampleIdHandlerFactory.java rename to service/src/main/java/us/kbase/workspace/kbase/SampleIdHandlerFactory.java diff --git a/src/us/kbase/workspace/kbase/SchemaUpdaterCLI.java b/service/src/main/java/us/kbase/workspace/kbase/SchemaUpdaterCLI.java similarity index 100% rename from src/us/kbase/workspace/kbase/SchemaUpdaterCLI.java rename to service/src/main/java/us/kbase/workspace/kbase/SchemaUpdaterCLI.java diff --git a/src/us/kbase/workspace/kbase/TypeClient.java b/service/src/main/java/us/kbase/workspace/kbase/TypeClient.java similarity index 100% rename from src/us/kbase/workspace/kbase/TypeClient.java rename to service/src/main/java/us/kbase/workspace/kbase/TypeClient.java diff --git a/src/us/kbase/workspace/kbase/TypeDelegationException.java b/service/src/main/java/us/kbase/workspace/kbase/TypeDelegationException.java similarity index 100% rename from src/us/kbase/workspace/kbase/TypeDelegationException.java rename to service/src/main/java/us/kbase/workspace/kbase/TypeDelegationException.java diff --git a/src/us/kbase/workspace/kbase/TypeServerMethods.java b/service/src/main/java/us/kbase/workspace/kbase/TypeServerMethods.java similarity index 100% rename from src/us/kbase/workspace/kbase/TypeServerMethods.java rename to service/src/main/java/us/kbase/workspace/kbase/TypeServerMethods.java diff --git a/src/us/kbase/workspace/kbase/WorkspaceServerMethods.java b/service/src/main/java/us/kbase/workspace/kbase/WorkspaceServerMethods.java similarity index 99% rename from src/us/kbase/workspace/kbase/WorkspaceServerMethods.java rename to service/src/main/java/us/kbase/workspace/kbase/WorkspaceServerMethods.java index 52d7d31a3..aaa008f63 100644 --- a/src/us/kbase/workspace/kbase/WorkspaceServerMethods.java +++ b/service/src/main/java/us/kbase/workspace/kbase/WorkspaceServerMethods.java @@ -36,7 +36,7 @@ import us.kbase.auth.AuthException; import us.kbase.auth.AuthToken; -import us.kbase.auth.ConfigurableAuthService; +import us.kbase.auth.client.AuthClient; import us.kbase.common.service.Tuple11; import us.kbase.common.service.Tuple9; import us.kbase.typedobj.core.TypeDefId; @@ -102,13 +102,13 @@ public class WorkspaceServerMethods { // TODO JAVADOC private final Workspace ws; - private final ConfigurableAuthService auth; + private final AuthClient auth; private final IdReferenceHandlerSetFactoryBuilder idFacBuilder; public WorkspaceServerMethods( final Workspace ws, final IdReferenceHandlerSetFactoryBuilder idFacBuilder, - final ConfigurableAuthService auth) { + final AuthClient auth) { this.ws = ws; this.idFacBuilder = idFacBuilder; this.auth = auth; @@ -134,7 +134,7 @@ public List getDependencyStatus() { return ret; } - public ConfigurableAuthService getAuth() { + public AuthClient getAuth() { return auth; } @@ -266,7 +266,7 @@ private List validateUsers(final List users, final AuthTo final List wsusers = convertUsers(users); final Map userok; try { - userok = auth.isValidUserName(users, token); + userok = auth.isValidUserName(users, token.getToken()); } catch (UnknownHostException uhe) { //message from UHE is only the host name throw new AuthException( diff --git a/src/us/kbase/workspace/kbase/admin/AdminCommand.java b/service/src/main/java/us/kbase/workspace/kbase/admin/AdminCommand.java similarity index 100% rename from src/us/kbase/workspace/kbase/admin/AdminCommand.java rename to service/src/main/java/us/kbase/workspace/kbase/admin/AdminCommand.java diff --git a/src/us/kbase/workspace/kbase/admin/AdminRole.java b/service/src/main/java/us/kbase/workspace/kbase/admin/AdminRole.java similarity index 100% rename from src/us/kbase/workspace/kbase/admin/AdminRole.java rename to service/src/main/java/us/kbase/workspace/kbase/admin/AdminRole.java diff --git a/src/us/kbase/workspace/kbase/admin/AdministrationCommandSetInstaller.java b/service/src/main/java/us/kbase/workspace/kbase/admin/AdministrationCommandSetInstaller.java similarity index 99% rename from src/us/kbase/workspace/kbase/admin/AdministrationCommandSetInstaller.java rename to service/src/main/java/us/kbase/workspace/kbase/admin/AdministrationCommandSetInstaller.java index 7b263325e..07722c58c 100644 --- a/src/us/kbase/workspace/kbase/admin/AdministrationCommandSetInstaller.java +++ b/service/src/main/java/us/kbase/workspace/kbase/admin/AdministrationCommandSetInstaller.java @@ -11,7 +11,7 @@ import java.util.Optional; import java.util.stream.Collectors; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/us/kbase/workspace/kbase/admin/AdministratorHandler.java b/service/src/main/java/us/kbase/workspace/kbase/admin/AdministratorHandler.java similarity index 100% rename from src/us/kbase/workspace/kbase/admin/AdministratorHandler.java rename to service/src/main/java/us/kbase/workspace/kbase/admin/AdministratorHandler.java diff --git a/src/us/kbase/workspace/kbase/admin/AdministratorHandlerException.java b/service/src/main/java/us/kbase/workspace/kbase/admin/AdministratorHandlerException.java similarity index 100% rename from src/us/kbase/workspace/kbase/admin/AdministratorHandlerException.java rename to service/src/main/java/us/kbase/workspace/kbase/admin/AdministratorHandlerException.java diff --git a/src/us/kbase/workspace/kbase/admin/DefaultAdminHandler.java b/service/src/main/java/us/kbase/workspace/kbase/admin/DefaultAdminHandler.java similarity index 100% rename from src/us/kbase/workspace/kbase/admin/DefaultAdminHandler.java rename to service/src/main/java/us/kbase/workspace/kbase/admin/DefaultAdminHandler.java diff --git a/src/us/kbase/workspace/kbase/admin/KBaseAuth2AdminHandler.java b/service/src/main/java/us/kbase/workspace/kbase/admin/KBaseAuth2AdminHandler.java similarity index 100% rename from src/us/kbase/workspace/kbase/admin/KBaseAuth2AdminHandler.java rename to service/src/main/java/us/kbase/workspace/kbase/admin/KBaseAuth2AdminHandler.java diff --git a/src/us/kbase/workspace/kbase/admin/WorkspaceAdministration.java b/service/src/main/java/us/kbase/workspace/kbase/admin/WorkspaceAdministration.java similarity index 100% rename from src/us/kbase/workspace/kbase/admin/WorkspaceAdministration.java rename to service/src/main/java/us/kbase/workspace/kbase/admin/WorkspaceAdministration.java diff --git a/src/us/kbase/workspace/listener/ListenerInitializationException.java b/service/src/main/java/us/kbase/workspace/listener/ListenerInitializationException.java similarity index 100% rename from src/us/kbase/workspace/listener/ListenerInitializationException.java rename to service/src/main/java/us/kbase/workspace/listener/ListenerInitializationException.java diff --git a/src/us/kbase/workspace/listener/WorkspaceEventListener.java b/service/src/main/java/us/kbase/workspace/listener/WorkspaceEventListener.java similarity index 100% rename from src/us/kbase/workspace/listener/WorkspaceEventListener.java rename to service/src/main/java/us/kbase/workspace/listener/WorkspaceEventListener.java diff --git a/src/us/kbase/workspace/listener/WorkspaceEventListenerFactory.java b/service/src/main/java/us/kbase/workspace/listener/WorkspaceEventListenerFactory.java similarity index 100% rename from src/us/kbase/workspace/listener/WorkspaceEventListenerFactory.java rename to service/src/main/java/us/kbase/workspace/listener/WorkspaceEventListenerFactory.java diff --git a/src/us/kbase/workspace/listener/package-info.java b/service/src/main/java/us/kbase/workspace/listener/package-info.java similarity index 100% rename from src/us/kbase/workspace/listener/package-info.java rename to service/src/main/java/us/kbase/workspace/listener/package-info.java diff --git a/src/us/kbase/workspace/modules/KafkaNotifierFactory.java b/service/src/main/java/us/kbase/workspace/modules/KafkaNotifierFactory.java similarity index 100% rename from src/us/kbase/workspace/modules/KafkaNotifierFactory.java rename to service/src/main/java/us/kbase/workspace/modules/KafkaNotifierFactory.java diff --git a/src/us/kbase/workspace/modules/package-info.java b/service/src/main/java/us/kbase/workspace/modules/package-info.java similarity index 100% rename from src/us/kbase/workspace/modules/package-info.java rename to service/src/main/java/us/kbase/workspace/modules/package-info.java diff --git a/src/us/kbase/workspace/version/WorkspaceVersion.java b/service/src/main/java/us/kbase/workspace/version/WorkspaceVersion.java similarity index 78% rename from src/us/kbase/workspace/version/WorkspaceVersion.java rename to service/src/main/java/us/kbase/workspace/version/WorkspaceVersion.java index 2d7947e4b..d855c9902 100644 --- a/src/us/kbase/workspace/version/WorkspaceVersion.java +++ b/service/src/main/java/us/kbase/workspace/version/WorkspaceVersion.java @@ -6,6 +6,6 @@ public class WorkspaceVersion { private WorkspaceVersion() {}; /** The version. */ - public static final String VERSION = "0.14.3"; + public static final String VERSION = "0.15.0"; } diff --git a/src/us/kbase/common/test/MapBuilder.java b/service/src/test/java/us/kbase/test/common/MapBuilder.java similarity index 93% rename from src/us/kbase/common/test/MapBuilder.java rename to service/src/test/java/us/kbase/test/common/MapBuilder.java index 2654366ed..9331772da 100644 --- a/src/us/kbase/common/test/MapBuilder.java +++ b/service/src/test/java/us/kbase/test/common/MapBuilder.java @@ -1,4 +1,4 @@ -package us.kbase.common.test; +package us.kbase.test.common; import java.util.HashMap; import java.util.Map; diff --git a/src/us/kbase/common/test/TestCommon.java b/service/src/test/java/us/kbase/test/common/TestCommon.java similarity index 98% rename from src/us/kbase/common/test/TestCommon.java rename to service/src/test/java/us/kbase/test/common/TestCommon.java index 85e7fc6d8..5cf4df005 100644 --- a/src/us/kbase/common/test/TestCommon.java +++ b/service/src/test/java/us/kbase/test/common/TestCommon.java @@ -1,4 +1,4 @@ -package us.kbase.common.test; +package us.kbase.test.common; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.instanceOf; @@ -37,6 +37,7 @@ import ch.qos.logback.classic.spi.ILoggingEvent; import ch.qos.logback.classic.spi.IThrowableProxy; import ch.qos.logback.core.AppenderBase; +import us.kbase.testutils.TestException; import us.kbase.typedobj.core.TempFilesManager; public class TestCommon { @@ -50,8 +51,6 @@ public class TestCommon { public static final String ARANGOEXE = "test.arango.exe"; public static final String ARANGOJS = "test.arango.js"; - public static final String JARS_PATH = "test.jars.dir"; - public static final String TEST_TEMP_DIR = "test.temp.dir"; public static final String KEEP_TEMP_DIR = "test.temp.dir.keep"; @@ -167,10 +166,6 @@ public static Path getSampleServiceDir() { return Paths.get(getTestProperty(SAMPLE_SERVICE_DIR)); } - public static Path getJarsDir() { - return Paths.get(getTestProperty(JARS_PATH)); - } - public static boolean getDeleteTempFiles() { return !"true".equals(getTestProperty(KEEP_TEMP_DIR)); } diff --git a/src/us/kbase/typedobj/test/AbsoluteTypeDefIdTest.java b/service/src/test/java/us/kbase/test/typedobj/AbsoluteTypeDefIdTest.java similarity index 96% rename from src/us/kbase/typedobj/test/AbsoluteTypeDefIdTest.java rename to service/src/test/java/us/kbase/test/typedobj/AbsoluteTypeDefIdTest.java index c2d15400c..945f18421 100644 --- a/src/us/kbase/typedobj/test/AbsoluteTypeDefIdTest.java +++ b/service/src/test/java/us/kbase/test/typedobj/AbsoluteTypeDefIdTest.java @@ -1,4 +1,4 @@ -package us.kbase.typedobj.test; +package us.kbase.test.typedobj; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; diff --git a/src/us/kbase/typedobj/test/BasicValidationTest.java b/service/src/test/java/us/kbase/test/typedobj/BasicValidationTest.java similarity index 99% rename from src/us/kbase/typedobj/test/BasicValidationTest.java rename to service/src/test/java/us/kbase/test/typedobj/BasicValidationTest.java index c034029a4..c673eea58 100644 --- a/src/us/kbase/typedobj/test/BasicValidationTest.java +++ b/service/src/test/java/us/kbase/test/typedobj/BasicValidationTest.java @@ -1,4 +1,4 @@ -package us.kbase.typedobj.test; +package us.kbase.test.typedobj; import static org.junit.Assert.*; @@ -32,8 +32,8 @@ import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameters; -import us.kbase.common.test.TestCommon; -import us.kbase.common.test.TestException; +import us.kbase.test.common.TestCommon; +import us.kbase.testutils.TestException; import us.kbase.typedobj.core.LocalTypeProvider; import us.kbase.typedobj.core.TypeDefId; import us.kbase.typedobj.core.TypeDefName; diff --git a/src/us/kbase/typedobj/test/DetailedValidationTest.java b/service/src/test/java/us/kbase/test/typedobj/DetailedValidationTest.java similarity index 99% rename from src/us/kbase/typedobj/test/DetailedValidationTest.java rename to service/src/test/java/us/kbase/test/typedobj/DetailedValidationTest.java index bf468f0db..f0f21b1e7 100644 --- a/src/us/kbase/typedobj/test/DetailedValidationTest.java +++ b/service/src/test/java/us/kbase/test/typedobj/DetailedValidationTest.java @@ -1,4 +1,4 @@ -package us.kbase.typedobj.test; +package us.kbase.test.typedobj; import static org.junit.Assert.*; @@ -36,8 +36,8 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; -import us.kbase.common.test.TestCommon; -import us.kbase.common.test.TestException; +import us.kbase.test.common.TestCommon; +import us.kbase.testutils.TestException; import us.kbase.typedobj.core.LocalTypeProvider; import us.kbase.typedobj.core.TypeDefId; import us.kbase.typedobj.core.TypeDefName; diff --git a/src/us/kbase/typedobj/test/DummyIdHandlerFactory.java b/service/src/test/java/us/kbase/test/typedobj/DummyIdHandlerFactory.java similarity index 99% rename from src/us/kbase/typedobj/test/DummyIdHandlerFactory.java rename to service/src/test/java/us/kbase/test/typedobj/DummyIdHandlerFactory.java index dffaff241..79cf0515e 100644 --- a/src/us/kbase/typedobj/test/DummyIdHandlerFactory.java +++ b/service/src/test/java/us/kbase/test/typedobj/DummyIdHandlerFactory.java @@ -1,4 +1,4 @@ -package us.kbase.typedobj.test; +package us.kbase.test.typedobj; import java.util.HashMap; import java.util.List; diff --git a/src/us/kbase/typedobj/test/DummyValidatedTypedObject.java b/service/src/test/java/us/kbase/test/typedobj/DummyValidatedTypedObject.java similarity index 98% rename from src/us/kbase/typedobj/test/DummyValidatedTypedObject.java rename to service/src/test/java/us/kbase/test/typedobj/DummyValidatedTypedObject.java index 854f7a2b7..202f30a33 100644 --- a/src/us/kbase/typedobj/test/DummyValidatedTypedObject.java +++ b/service/src/test/java/us/kbase/test/typedobj/DummyValidatedTypedObject.java @@ -1,4 +1,4 @@ -package us.kbase.typedobj.test; +package us.kbase.test.typedobj; import java.util.Collections; import java.util.List; diff --git a/src/us/kbase/typedobj/test/IdProcessingTest.java b/service/src/test/java/us/kbase/test/typedobj/IdProcessingTest.java similarity index 99% rename from src/us/kbase/typedobj/test/IdProcessingTest.java rename to service/src/test/java/us/kbase/test/typedobj/IdProcessingTest.java index a25ebd752..8c66ca4fa 100644 --- a/src/us/kbase/typedobj/test/IdProcessingTest.java +++ b/service/src/test/java/us/kbase/test/typedobj/IdProcessingTest.java @@ -1,4 +1,4 @@ -package us.kbase.typedobj.test; +package us.kbase.test.typedobj; import static org.junit.Assert.*; import static org.hamcrest.CoreMatchers.is; @@ -40,8 +40,8 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; -import us.kbase.common.test.TestCommon; -import us.kbase.common.test.TestException; +import us.kbase.test.common.TestCommon; +import us.kbase.testutils.TestException; import us.kbase.common.utils.sortjson.UTF8JsonSorterFactory; import us.kbase.typedobj.core.LocalTypeProvider; import us.kbase.typedobj.core.TypeDefId; diff --git a/src/us/kbase/typedobj/test/IdRefTokenSequenceProviderTest.java b/service/src/test/java/us/kbase/test/typedobj/IdRefTokenSequenceProviderTest.java similarity index 99% rename from src/us/kbase/typedobj/test/IdRefTokenSequenceProviderTest.java rename to service/src/test/java/us/kbase/test/typedobj/IdRefTokenSequenceProviderTest.java index 4ff9155a1..13f0c9fe9 100644 --- a/src/us/kbase/typedobj/test/IdRefTokenSequenceProviderTest.java +++ b/service/src/test/java/us/kbase/test/typedobj/IdRefTokenSequenceProviderTest.java @@ -1,4 +1,4 @@ -package us.kbase.typedobj.test; +package us.kbase.test.typedobj; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; diff --git a/src/us/kbase/typedobj/test/JsonSchemas.java b/service/src/test/java/us/kbase/test/typedobj/JsonSchemas.java similarity index 94% rename from src/us/kbase/typedobj/test/JsonSchemas.java rename to service/src/test/java/us/kbase/test/typedobj/JsonSchemas.java index c63b32c66..214bf7ba6 100644 --- a/src/us/kbase/typedobj/test/JsonSchemas.java +++ b/service/src/test/java/us/kbase/test/typedobj/JsonSchemas.java @@ -1,4 +1,4 @@ -package us.kbase.typedobj.test; +package us.kbase.test.typedobj; import java.util.Map; @@ -6,7 +6,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.collect.ImmutableMap; -import us.kbase.common.test.MapBuilder; +import us.kbase.test.common.MapBuilder; /** Json schema strings for use in tests. * @author gaprice@lbl.gov diff --git a/src/us/kbase/typedobj/test/JsonTokenValidatorTester.java b/service/src/test/java/us/kbase/test/typedobj/JsonTokenValidatorTester.java similarity index 98% rename from src/us/kbase/typedobj/test/JsonTokenValidatorTester.java rename to service/src/test/java/us/kbase/test/typedobj/JsonTokenValidatorTester.java index 800186d2f..59a9d799e 100644 --- a/src/us/kbase/typedobj/test/JsonTokenValidatorTester.java +++ b/service/src/test/java/us/kbase/test/typedobj/JsonTokenValidatorTester.java @@ -1,4 +1,4 @@ -package us.kbase.typedobj.test; +package us.kbase.test.typedobj; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; @@ -16,6 +16,7 @@ import us.kbase.common.service.JsonTokenStream; import us.kbase.common.service.UObject; +import us.kbase.test.typedobj.db.TypeRegisteringTest; import us.kbase.typedobj.core.LocalTypeProvider; import us.kbase.typedobj.core.TypeDefId; import us.kbase.typedobj.core.TypeDefName; @@ -24,7 +25,6 @@ import us.kbase.typedobj.db.MongoTypeStorage; import us.kbase.typedobj.db.TypeDefinitionDB; import us.kbase.typedobj.db.TypeStorage; -import us.kbase.typedobj.db.test.TypeRegisteringTest; import us.kbase.typedobj.idref.IdReferenceHandlerSet; import us.kbase.typedobj.idref.IdReferenceHandlerSetFactory; import us.kbase.typedobj.idref.IdReferenceHandlerSetFactoryBuilder; diff --git a/src/us/kbase/typedobj/test/LocalTypeProviderTest.java b/service/src/test/java/us/kbase/test/typedobj/LocalTypeProviderTest.java similarity index 96% rename from src/us/kbase/typedobj/test/LocalTypeProviderTest.java rename to service/src/test/java/us/kbase/test/typedobj/LocalTypeProviderTest.java index e11cc53ec..3688b89e1 100644 --- a/src/us/kbase/typedobj/test/LocalTypeProviderTest.java +++ b/service/src/test/java/us/kbase/test/typedobj/LocalTypeProviderTest.java @@ -1,4 +1,4 @@ -package us.kbase.typedobj.test; +package us.kbase.test.typedobj; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; @@ -8,7 +8,7 @@ import org.junit.Test; -import us.kbase.common.test.TestCommon; +import us.kbase.test.common.TestCommon; import us.kbase.typedobj.core.AbsoluteTypeDefId; import us.kbase.typedobj.core.LocalTypeProvider; import us.kbase.typedobj.core.TypeDefId; diff --git a/src/us/kbase/typedobj/test/MetadataExtractionTest.java b/service/src/test/java/us/kbase/test/typedobj/MetadataExtractionTest.java similarity index 99% rename from src/us/kbase/typedobj/test/MetadataExtractionTest.java rename to service/src/test/java/us/kbase/test/typedobj/MetadataExtractionTest.java index 1b1e473d4..fa241b31e 100644 --- a/src/us/kbase/typedobj/test/MetadataExtractionTest.java +++ b/service/src/test/java/us/kbase/test/typedobj/MetadataExtractionTest.java @@ -1,4 +1,4 @@ -package us.kbase.typedobj.test; +package us.kbase.test.typedobj; import static org.junit.Assert.*; @@ -37,8 +37,8 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; -import us.kbase.common.test.TestCommon; -import us.kbase.common.test.TestException; +import us.kbase.test.common.TestCommon; +import us.kbase.testutils.TestException; import us.kbase.typedobj.core.ExtractedMetadata; import us.kbase.typedobj.core.LocalTypeProvider; import us.kbase.typedobj.core.TypeDefId; diff --git a/src/us/kbase/typedobj/test/ObjectExtractionByPathTest.java b/service/src/test/java/us/kbase/test/typedobj/ObjectExtractionByPathTest.java similarity index 99% rename from src/us/kbase/typedobj/test/ObjectExtractionByPathTest.java rename to service/src/test/java/us/kbase/test/typedobj/ObjectExtractionByPathTest.java index 8132113fa..88a6f753f 100644 --- a/src/us/kbase/typedobj/test/ObjectExtractionByPathTest.java +++ b/service/src/test/java/us/kbase/test/typedobj/ObjectExtractionByPathTest.java @@ -1,4 +1,4 @@ -package us.kbase.typedobj.test; +package us.kbase.test.typedobj; import static org.junit.Assert.*; @@ -34,7 +34,7 @@ import com.fasterxml.jackson.databind.SerializationFeature; import us.kbase.common.service.JsonTokenStream; -import us.kbase.common.test.TestException; +import us.kbase.testutils.TestException; import us.kbase.typedobj.core.SubsetSelection; import us.kbase.typedobj.core.SubdataExtractor; import us.kbase.typedobj.exceptions.TypedObjectExtractionException; diff --git a/src/us/kbase/typedobj/test/ProfileBasicValidation.java b/service/src/test/java/us/kbase/test/typedobj/ProfileBasicValidation.java similarity index 99% rename from src/us/kbase/typedobj/test/ProfileBasicValidation.java rename to service/src/test/java/us/kbase/test/typedobj/ProfileBasicValidation.java index 8d39f6124..cd0af94d2 100644 --- a/src/us/kbase/typedobj/test/ProfileBasicValidation.java +++ b/service/src/test/java/us/kbase/test/typedobj/ProfileBasicValidation.java @@ -1,4 +1,4 @@ -package us.kbase.typedobj.test; +package us.kbase.test.typedobj; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; @@ -25,6 +25,7 @@ import org.apache.commons.io.FileUtils; +import us.kbase.test.typedobj.db.TypeRegisteringTest; import us.kbase.typedobj.core.LocalTypeProvider; import us.kbase.typedobj.core.TypeDefId; import us.kbase.typedobj.core.TypeDefName; @@ -33,7 +34,6 @@ import us.kbase.typedobj.db.MongoTypeStorage; import us.kbase.typedobj.db.TypeDefinitionDB; import us.kbase.typedobj.db.TypeStorage; -import us.kbase.typedobj.db.test.TypeRegisteringTest; import us.kbase.typedobj.idref.IdReferenceHandlerSet; import us.kbase.typedobj.idref.IdReferenceHandlerSetFactory; import us.kbase.typedobj.idref.IdReferenceHandlerSetFactoryBuilder; diff --git a/src/us/kbase/typedobj/test/TypeDefIdTest.java b/service/src/test/java/us/kbase/test/typedobj/TypeDefIdTest.java similarity index 93% rename from src/us/kbase/typedobj/test/TypeDefIdTest.java rename to service/src/test/java/us/kbase/test/typedobj/TypeDefIdTest.java index fe50520cb..2dd60ff05 100644 --- a/src/us/kbase/typedobj/test/TypeDefIdTest.java +++ b/service/src/test/java/us/kbase/test/typedobj/TypeDefIdTest.java @@ -1,9 +1,9 @@ -package us.kbase.typedobj.test; +package us.kbase.test.typedobj; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; import static org.junit.Assert.fail; -import static us.kbase.common.test.TestCommon.assertExceptionCorrect; +import static us.kbase.test.common.TestCommon.assertExceptionCorrect; import org.junit.Test; diff --git a/src/us/kbase/typedobj/test/TypeDefsTest.java b/service/src/test/java/us/kbase/test/typedobj/TypeDefsTest.java similarity index 99% rename from src/us/kbase/typedobj/test/TypeDefsTest.java rename to service/src/test/java/us/kbase/test/typedobj/TypeDefsTest.java index 909c911d3..582e55919 100644 --- a/src/us/kbase/typedobj/test/TypeDefsTest.java +++ b/service/src/test/java/us/kbase/test/typedobj/TypeDefsTest.java @@ -1,4 +1,4 @@ -package us.kbase.typedobj.test; +package us.kbase.test.typedobj; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertFalse; diff --git a/src/us/kbase/typedobj/test/TypeProviderTest.java b/service/src/test/java/us/kbase/test/typedobj/TypeProviderTest.java similarity index 95% rename from src/us/kbase/typedobj/test/TypeProviderTest.java rename to service/src/test/java/us/kbase/test/typedobj/TypeProviderTest.java index c87410c9c..efbdfe701 100644 --- a/src/us/kbase/typedobj/test/TypeProviderTest.java +++ b/service/src/test/java/us/kbase/test/typedobj/TypeProviderTest.java @@ -1,4 +1,4 @@ -package us.kbase.typedobj.test; +package us.kbase.test.typedobj; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; @@ -7,7 +7,7 @@ import org.junit.Test; import nl.jqno.equalsverifier.EqualsVerifier; -import us.kbase.common.test.TestCommon; +import us.kbase.test.common.TestCommon; import us.kbase.typedobj.core.AbsoluteTypeDefId; import us.kbase.typedobj.core.TypeDefName; import us.kbase.typedobj.core.TypeProvider.ResolvedType; diff --git a/src/us/kbase/typedobj/test/TypedObjectValidationReportTest.java b/service/src/test/java/us/kbase/test/typedobj/TypedObjectValidationReportTest.java similarity index 99% rename from src/us/kbase/typedobj/test/TypedObjectValidationReportTest.java rename to service/src/test/java/us/kbase/test/typedobj/TypedObjectValidationReportTest.java index fb7a7e3c7..46f8e9244 100644 --- a/src/us/kbase/typedobj/test/TypedObjectValidationReportTest.java +++ b/service/src/test/java/us/kbase/test/typedobj/TypedObjectValidationReportTest.java @@ -1,4 +1,4 @@ -package us.kbase.typedobj.test; +package us.kbase.test.typedobj; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; @@ -22,8 +22,7 @@ import org.junit.BeforeClass; import org.junit.Test; - -import us.kbase.common.test.TestCommon; +import us.kbase.test.common.TestCommon; import us.kbase.common.utils.sortjson.KeyDuplicationException; import us.kbase.common.utils.sortjson.TooManyKeysException; import us.kbase.common.utils.sortjson.UTF8JsonSorterFactory; diff --git a/src/us/kbase/typedobj/db/test/HighLoadParallelTester.java b/service/src/test/java/us/kbase/test/typedobj/db/HighLoadParallelTester.java similarity index 99% rename from src/us/kbase/typedobj/db/test/HighLoadParallelTester.java rename to service/src/test/java/us/kbase/test/typedobj/db/HighLoadParallelTester.java index 2c1b3c64b..8e99ca7f7 100644 --- a/src/us/kbase/typedobj/db/test/HighLoadParallelTester.java +++ b/service/src/test/java/us/kbase/test/typedobj/db/HighLoadParallelTester.java @@ -1,4 +1,4 @@ -package us.kbase.typedobj.db.test; +package us.kbase.test.typedobj.db; import java.io.File; import java.util.ArrayList; diff --git a/src/us/kbase/typedobj/db/test/MongoTypeStorageTest.java b/service/src/test/java/us/kbase/test/typedobj/db/MongoTypeStorageTest.java similarity index 97% rename from src/us/kbase/typedobj/db/test/MongoTypeStorageTest.java rename to service/src/test/java/us/kbase/test/typedobj/db/MongoTypeStorageTest.java index e3a5afb04..9b02235b7 100644 --- a/src/us/kbase/typedobj/db/test/MongoTypeStorageTest.java +++ b/service/src/test/java/us/kbase/test/typedobj/db/MongoTypeStorageTest.java @@ -1,4 +1,4 @@ -package us.kbase.typedobj.db.test; +package us.kbase.test.typedobj.db; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; @@ -16,8 +16,8 @@ import com.mongodb.client.MongoClients; import com.mongodb.client.MongoDatabase; -import us.kbase.common.test.TestCommon; -import us.kbase.common.test.controllers.mongo.MongoController; +import us.kbase.test.common.TestCommon; +import us.kbase.testutils.controllers.mongo.MongoController; import us.kbase.typedobj.db.ModuleInfo; import us.kbase.typedobj.db.MongoTypeStorage; import us.kbase.typedobj.db.OwnerInfo; @@ -43,7 +43,6 @@ public static void setUp() throws Exception { System.out.println("Started test mongo instance at localhost:" + MONGO.getServerPort()); - @SuppressWarnings("resource") final MongoClient mc = MongoClients.create("mongodb://localhost:" + MONGO.getServerPort()); MONGO_DB = mc.getDatabase("test_" + MongoTypeStorageTest.class.getSimpleName()); } diff --git a/src/us/kbase/typedobj/db/test/TestTypeStorage.java b/service/src/test/java/us/kbase/test/typedobj/db/TestTypeStorage.java similarity index 91% rename from src/us/kbase/typedobj/db/test/TestTypeStorage.java rename to service/src/test/java/us/kbase/test/typedobj/db/TestTypeStorage.java index e1af6daad..cab167475 100644 --- a/src/us/kbase/typedobj/db/test/TestTypeStorage.java +++ b/service/src/test/java/us/kbase/test/typedobj/db/TestTypeStorage.java @@ -1,4 +1,4 @@ -package us.kbase.typedobj.db.test; +package us.kbase.test.typedobj.db; import java.util.List; diff --git a/src/us/kbase/typedobj/db/test/TestTypeStorageFactory.java b/service/src/test/java/us/kbase/test/typedobj/db/TestTypeStorageFactory.java similarity index 98% rename from src/us/kbase/typedobj/db/test/TestTypeStorageFactory.java rename to service/src/test/java/us/kbase/test/typedobj/db/TestTypeStorageFactory.java index 546232e6f..01b01a3e5 100644 --- a/src/us/kbase/typedobj/db/test/TestTypeStorageFactory.java +++ b/service/src/test/java/us/kbase/test/typedobj/db/TestTypeStorageFactory.java @@ -1,4 +1,4 @@ -package us.kbase.typedobj.db.test; +package us.kbase.test.typedobj.db; import java.lang.reflect.InvocationHandler; import java.lang.reflect.InvocationTargetException; diff --git a/src/us/kbase/typedobj/db/test/TypeRegisteringTest.java b/service/src/test/java/us/kbase/test/typedobj/db/TypeRegisteringTest.java similarity index 99% rename from src/us/kbase/typedobj/db/test/TypeRegisteringTest.java rename to service/src/test/java/us/kbase/test/typedobj/db/TypeRegisteringTest.java index a71f7cd7a..d4a40fa8c 100644 --- a/src/us/kbase/typedobj/db/test/TypeRegisteringTest.java +++ b/service/src/test/java/us/kbase/test/typedobj/db/TypeRegisteringTest.java @@ -1,4 +1,4 @@ -package us.kbase.typedobj.db.test; +package us.kbase.test.typedobj.db; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.notNullValue; @@ -37,8 +37,8 @@ import com.mongodb.client.MongoClients; import com.mongodb.client.MongoDatabase; -import us.kbase.common.test.TestCommon; -import us.kbase.common.test.controllers.mongo.MongoController; +import us.kbase.test.common.TestCommon; +import us.kbase.testutils.controllers.mongo.MongoController; import us.kbase.typedobj.core.AbsoluteTypeDefId; import us.kbase.typedobj.core.MD5; import us.kbase.typedobj.core.TypeDefId; @@ -144,7 +144,6 @@ public static MongoDatabase createMongoDbConnection() throws Exception { System.out.println("Using mongo temp dir " + mongo.getTempDir()); } - @SuppressWarnings("resource") final MongoClient mcli = MongoClients.create("mongodb://localhost:" + mongo.getServerPort()); final MongoDatabase mdb = mcli.getDatabase("TypeRegisteringTest"); TestCommon.destroyDB(mdb); diff --git a/src/us/kbase/typedobj/db/test/TypeStorageListener.java b/service/src/test/java/us/kbase/test/typedobj/db/TypeStorageListener.java similarity index 89% rename from src/us/kbase/typedobj/db/test/TypeStorageListener.java rename to service/src/test/java/us/kbase/test/typedobj/db/TypeStorageListener.java index ea7aee145..5e4d4400a 100644 --- a/src/us/kbase/typedobj/db/test/TypeStorageListener.java +++ b/service/src/test/java/us/kbase/test/typedobj/db/TypeStorageListener.java @@ -1,4 +1,4 @@ -package us.kbase.typedobj.db.test; +package us.kbase.test.typedobj.db; import us.kbase.typedobj.exceptions.TypeStorageException; diff --git a/src/us/kbase/typedobj/test/idref/IdReferenceHandlerSetFactoryBuilderTest.java b/service/src/test/java/us/kbase/test/typedobj/idref/IdReferenceHandlerSetFactoryBuilderTest.java similarity index 98% rename from src/us/kbase/typedobj/test/idref/IdReferenceHandlerSetFactoryBuilderTest.java rename to service/src/test/java/us/kbase/test/typedobj/idref/IdReferenceHandlerSetFactoryBuilderTest.java index 5dd44f27c..f14895077 100644 --- a/src/us/kbase/typedobj/test/idref/IdReferenceHandlerSetFactoryBuilderTest.java +++ b/service/src/test/java/us/kbase/test/typedobj/idref/IdReferenceHandlerSetFactoryBuilderTest.java @@ -1,4 +1,4 @@ -package us.kbase.typedobj.test.idref; +package us.kbase.test.typedobj.idref; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; @@ -7,7 +7,7 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyNoMoreInteractions; import static org.mockito.Mockito.when; -import static us.kbase.common.test.TestCommon.set; +import static us.kbase.test.common.TestCommon.set; import java.util.Arrays; import java.util.Collections; @@ -15,7 +15,7 @@ import org.junit.Test; import us.kbase.auth.AuthToken; -import us.kbase.common.test.TestCommon; +import us.kbase.test.common.TestCommon; import us.kbase.typedobj.idref.IdReference; import us.kbase.typedobj.idref.IdReferenceHandlerSet; import us.kbase.typedobj.idref.IdReferenceHandlerSet.IdReferenceHandler; diff --git a/src/us/kbase/typedobj/test/idref/IdReferencePermissionHandlerSetTest.java b/service/src/test/java/us/kbase/test/typedobj/idref/IdReferencePermissionHandlerSetTest.java similarity index 98% rename from src/us/kbase/typedobj/test/idref/IdReferencePermissionHandlerSetTest.java rename to service/src/test/java/us/kbase/test/typedobj/idref/IdReferencePermissionHandlerSetTest.java index c6d89b19b..899d83709 100644 --- a/src/us/kbase/typedobj/test/idref/IdReferencePermissionHandlerSetTest.java +++ b/service/src/test/java/us/kbase/test/typedobj/idref/IdReferencePermissionHandlerSetTest.java @@ -1,4 +1,4 @@ -package us.kbase.typedobj.test.idref; +package us.kbase.test.typedobj.idref; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; @@ -7,13 +7,13 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyZeroInteractions; import static org.mockito.Mockito.when; -import static us.kbase.common.test.TestCommon.set; +import static us.kbase.test.common.TestCommon.set; import java.util.Collection; import org.junit.Test; -import us.kbase.common.test.TestCommon; +import us.kbase.test.common.TestCommon; import us.kbase.typedobj.idref.IdReferenceHandlerSetFactory.IdReferenceHandlerFactory; import us.kbase.typedobj.idref.IdReferenceHandlerSetFactoryBuilder; import us.kbase.typedobj.idref.IdReferencePermissionHandlerSet; diff --git a/src/us/kbase/typedobj/test/idref/IdReferenceTypeTest.java b/service/src/test/java/us/kbase/test/typedobj/idref/IdReferenceTypeTest.java similarity index 96% rename from src/us/kbase/typedobj/test/idref/IdReferenceTypeTest.java rename to service/src/test/java/us/kbase/test/typedobj/idref/IdReferenceTypeTest.java index 7e55acd98..3ac80cc47 100644 --- a/src/us/kbase/typedobj/test/idref/IdReferenceTypeTest.java +++ b/service/src/test/java/us/kbase/test/typedobj/idref/IdReferenceTypeTest.java @@ -1,4 +1,4 @@ -package us.kbase.typedobj.test.idref; +package us.kbase.test.typedobj.idref; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; @@ -9,7 +9,7 @@ import org.junit.Test; import nl.jqno.equalsverifier.EqualsVerifier; -import us.kbase.common.test.TestCommon; +import us.kbase.test.common.TestCommon; import us.kbase.typedobj.idref.IdReferenceType; public class IdReferenceTypeTest { diff --git a/src/us/kbase/workspace/test/JsonTokenStreamOCStat.java b/service/src/test/java/us/kbase/test/workspace/JsonTokenStreamOCStat.java similarity index 97% rename from src/us/kbase/workspace/test/JsonTokenStreamOCStat.java rename to service/src/test/java/us/kbase/test/workspace/JsonTokenStreamOCStat.java index 525f55081..0700322b9 100644 --- a/src/us/kbase/workspace/test/JsonTokenStreamOCStat.java +++ b/service/src/test/java/us/kbase/test/workspace/JsonTokenStreamOCStat.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test; +package us.kbase.test.workspace; import java.util.LinkedHashMap; import java.util.Map; diff --git a/src/us/kbase/workspace/test/LongTextForTestUsage.java b/service/src/test/java/us/kbase/test/workspace/LongTextForTestUsage.java similarity index 96% rename from src/us/kbase/workspace/test/LongTextForTestUsage.java rename to service/src/test/java/us/kbase/test/workspace/LongTextForTestUsage.java index 78b9d3015..5e446cd7f 100644 --- a/src/us/kbase/workspace/test/LongTextForTestUsage.java +++ b/service/src/test/java/us/kbase/test/workspace/LongTextForTestUsage.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test; +package us.kbase.test.workspace; public class LongTextForTestUsage { diff --git a/src/us/kbase/workspace/test/UpdateOptionsMatcher.java b/service/src/test/java/us/kbase/test/workspace/UpdateOptionsMatcher.java similarity index 96% rename from src/us/kbase/workspace/test/UpdateOptionsMatcher.java rename to service/src/test/java/us/kbase/test/workspace/UpdateOptionsMatcher.java index 56fcf4506..7ad983057 100644 --- a/src/us/kbase/workspace/test/UpdateOptionsMatcher.java +++ b/service/src/test/java/us/kbase/test/workspace/UpdateOptionsMatcher.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test; +package us.kbase.test.workspace; import org.mockito.ArgumentMatcher; diff --git a/src/us/kbase/workspace/test/WorkspaceMongoIndex.java b/service/src/test/java/us/kbase/test/workspace/WorkspaceMongoIndex.java similarity index 96% rename from src/us/kbase/workspace/test/WorkspaceMongoIndex.java rename to service/src/test/java/us/kbase/test/workspace/WorkspaceMongoIndex.java index 78959c14f..d4921cc5d 100644 --- a/src/us/kbase/workspace/test/WorkspaceMongoIndex.java +++ b/service/src/test/java/us/kbase/test/workspace/WorkspaceMongoIndex.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test; +package us.kbase.test.workspace; import com.mongodb.client.MongoDatabase; import org.bson.Document; diff --git a/src/us/kbase/workspace/test/WorkspaceServerThread.java b/service/src/test/java/us/kbase/test/workspace/WorkspaceServerThread.java similarity index 92% rename from src/us/kbase/workspace/test/WorkspaceServerThread.java rename to service/src/test/java/us/kbase/test/workspace/WorkspaceServerThread.java index d1966e406..6523f1029 100644 --- a/src/us/kbase/workspace/test/WorkspaceServerThread.java +++ b/service/src/test/java/us/kbase/test/workspace/WorkspaceServerThread.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test; +package us.kbase.test.workspace; import us.kbase.workspace.WorkspaceServer; diff --git a/src/us/kbase/workspace/test/WorkspaceTestCommon.java b/service/src/test/java/us/kbase/test/workspace/WorkspaceTestCommon.java similarity index 97% rename from src/us/kbase/workspace/test/WorkspaceTestCommon.java rename to service/src/test/java/us/kbase/test/workspace/WorkspaceTestCommon.java index 43d504ed9..4d70e622b 100644 --- a/src/us/kbase/workspace/test/WorkspaceTestCommon.java +++ b/service/src/test/java/us/kbase/test/workspace/WorkspaceTestCommon.java @@ -1,6 +1,6 @@ -package us.kbase.workspace.test; +package us.kbase.test.workspace; -import static us.kbase.common.test.TestCommon.now; +import static us.kbase.test.common.TestCommon.now; import java.util.Arrays; import java.util.Map; diff --git a/src/us/kbase/workspace/test/controllers/arango/ArangoController.java b/service/src/test/java/us/kbase/test/workspace/controllers/arango/ArangoController.java similarity index 93% rename from src/us/kbase/workspace/test/controllers/arango/ArangoController.java rename to service/src/test/java/us/kbase/test/workspace/controllers/arango/ArangoController.java index ef852ea84..0568cea7e 100644 --- a/src/us/kbase/workspace/test/controllers/arango/ArangoController.java +++ b/service/src/test/java/us/kbase/test/workspace/controllers/arango/ArangoController.java @@ -1,8 +1,8 @@ -package us.kbase.workspace.test.controllers.arango; +package us.kbase.test.workspace.controllers.arango; -import static us.kbase.common.test.controllers.ControllerCommon.checkExe; -import static us.kbase.common.test.controllers.ControllerCommon.findFreePort; -import static us.kbase.common.test.controllers.ControllerCommon.makeTempDirs; +import static us.kbase.testutils.controllers.ControllerCommon.checkExe; +import static us.kbase.testutils.controllers.ControllerCommon.findFreePort; +import static us.kbase.testutils.controllers.ControllerCommon.makeTempDirs; import java.io.IOException; import java.nio.file.Files; diff --git a/src/us/kbase/workspace/test/controllers/handle/HandleServiceController.java b/service/src/test/java/us/kbase/test/workspace/controllers/handle/HandleServiceController.java similarity index 93% rename from src/us/kbase/workspace/test/controllers/handle/HandleServiceController.java rename to service/src/test/java/us/kbase/test/workspace/controllers/handle/HandleServiceController.java index e38d10008..87fbd1ead 100644 --- a/src/us/kbase/workspace/test/controllers/handle/HandleServiceController.java +++ b/service/src/test/java/us/kbase/test/workspace/controllers/handle/HandleServiceController.java @@ -1,7 +1,7 @@ -package us.kbase.workspace.test.controllers.handle; +package us.kbase.test.workspace.controllers.handle; -import static us.kbase.common.test.controllers.ControllerCommon.findFreePort; -import static us.kbase.common.test.controllers.ControllerCommon.makeTempDirs; +import static us.kbase.testutils.controllers.ControllerCommon.findFreePort; +import static us.kbase.testutils.controllers.ControllerCommon.makeTempDirs; import java.io.BufferedReader; import java.io.File; @@ -16,7 +16,7 @@ import org.ini4j.Profile.Section; import us.kbase.auth.AuthToken; -import us.kbase.common.test.controllers.mongo.MongoController; +import us.kbase.testutils.controllers.mongo.MongoController; /** Q&D Utility to run the Handle Service for the purposes of testing from Java. diff --git a/src/us/kbase/workspace/test/controllers/sample/SampleServiceController.java b/service/src/test/java/us/kbase/test/workspace/controllers/sample/SampleServiceController.java similarity index 96% rename from src/us/kbase/workspace/test/controllers/sample/SampleServiceController.java rename to service/src/test/java/us/kbase/test/workspace/controllers/sample/SampleServiceController.java index 3b4732cdf..f49928386 100644 --- a/src/us/kbase/workspace/test/controllers/sample/SampleServiceController.java +++ b/service/src/test/java/us/kbase/test/workspace/controllers/sample/SampleServiceController.java @@ -1,7 +1,7 @@ -package us.kbase.workspace.test.controllers.sample; +package us.kbase.test.workspace.controllers.sample; -import static us.kbase.common.test.controllers.ControllerCommon.findFreePort; -import static us.kbase.common.test.controllers.ControllerCommon.makeTempDirs; +import static us.kbase.testutils.controllers.ControllerCommon.findFreePort; +import static us.kbase.testutils.controllers.ControllerCommon.makeTempDirs; import static us.kbase.workspace.database.Util.checkString; import java.io.BufferedReader; @@ -17,7 +17,7 @@ import org.ini4j.Ini; import org.ini4j.Profile.Section; -import us.kbase.workspace.test.controllers.arango.ArangoController; +import us.kbase.test.workspace.controllers.arango.ArangoController; /** Q&D Utility to run the Sample Service for the purposes of testing from Java. * @author gaprice@lbl.gov diff --git a/service/src/test/java/us/kbase/test/workspace/controllers/workspace/WorkspaceController.java b/service/src/test/java/us/kbase/test/workspace/controllers/workspace/WorkspaceController.java new file mode 100644 index 000000000..6e9423a04 --- /dev/null +++ b/service/src/test/java/us/kbase/test/workspace/controllers/workspace/WorkspaceController.java @@ -0,0 +1,115 @@ +package us.kbase.test.workspace.controllers.workspace; + +import static us.kbase.testutils.controllers.ControllerCommon.findFreePort; +import static us.kbase.testutils.controllers.ControllerCommon.makeTempDirs; + +import java.io.File; +import java.io.IOException; +import java.net.URL; +import java.nio.file.Path; +import java.util.Arrays; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +import org.apache.commons.io.FileUtils; +import org.ini4j.Ini; +import org.ini4j.Profile.Section; + +import us.kbase.workspace.WorkspaceServer; + + +/** Q&D Utility to run a Workspace server for the purposes of testing from + * Java. Expected to be packaged in a test jar with all dependencies. + * + * Initializes a GridFS backend and does not support handles, byte streams, or listeners. + * @author gaprice@lbl.gov + * + */ +public class WorkspaceController { + + private final static String DATA_DIR = "temp_data"; + private static final String WS_CLASS = WorkspaceServer.class.getName(); + private static final String JAR_PATH = WorkspaceServer.class.getProtectionDomain() + .getCodeSource().getLocation().getPath(); + + private final static List tempDirectories = new LinkedList(); + static { + tempDirectories.add(DATA_DIR); + } + + private final Path tempDir; + + private final Process workspace; + private final int port; + + public WorkspaceController( + final String mongoHost, + final String mongoDatabase, + final String mongoTypeDatabase, + final String adminUser, + final URL authServiceRootURL, // expected to include /testmode endpoint + final Path rootTempDir) + throws Exception { + tempDir = makeTempDirs(rootTempDir, "WorkspaceController-", tempDirectories); + port = findFreePort(); + System.out.println("Using classpath " + JAR_PATH); + + final Path deployCfg = createDeployCfg( + mongoHost, mongoDatabase, mongoTypeDatabase, authServiceRootURL, adminUser); + final List command = new LinkedList(); + command.addAll(Arrays.asList("java", "-classpath", JAR_PATH, WS_CLASS, "" + port)); + final ProcessBuilder servpb = new ProcessBuilder(command) + .redirectErrorStream(true) + .redirectOutput(tempDir.resolve("workspace.log").toFile()); + + final Map env = servpb.environment(); + env.put("KB_DEPLOYMENT_CONFIG", deployCfg.toString()); + + workspace = servpb.start(); + // TODO TEST add periodic check w/ exponential backoff + Thread.sleep(5000); + } + + private Path createDeployCfg( + final String mongoHost, + final String mongoDatabase, + final String mongoTypeDatabase, + final URL authRootURL, + final String adminUser) + throws IOException { + final File iniFile = new File(tempDir.resolve("test.cfg").toString()); + System.out.println("Created temporary workspace config file: " + + iniFile.getAbsolutePath()); + final Ini ini = new Ini(); + Section ws = ini.add("Workspace"); + ws.add("mongodb-host", mongoHost); + ws.add("mongodb-database", mongoDatabase); + ws.add("mongodb-type-database", mongoTypeDatabase); + ws.add("backend-type", "GridFS"); + ws.add("auth2-service-url", authRootURL); + ws.add("ws-admin", adminUser); + ws.add("temp-dir", tempDir.resolve("temp_data")); + ws.add("ignore-handle-service", "true"); + ini.store(iniFile); + return iniFile.toPath(); + } + + public int getServerPort() { + return port; + } + + public Path getTempDir() { + return tempDir; + } + + public void destroy(boolean deleteTempFiles) throws IOException { + if (workspace != null) { + workspace.destroy(); + } + if (tempDir != null && deleteTempFiles) { + FileUtils.deleteDirectory(tempDir.toFile()); + } + } +} + diff --git a/src/us/kbase/workspace/test/database/DependencyStatusTest.java b/service/src/test/java/us/kbase/test/workspace/database/DependencyStatusTest.java similarity index 97% rename from src/us/kbase/workspace/test/database/DependencyStatusTest.java rename to service/src/test/java/us/kbase/test/workspace/database/DependencyStatusTest.java index 07dca2589..57c758e28 100644 --- a/src/us/kbase/workspace/test/database/DependencyStatusTest.java +++ b/service/src/test/java/us/kbase/test/workspace/database/DependencyStatusTest.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.database; +package us.kbase.test.workspace.database; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; diff --git a/src/us/kbase/workspace/test/database/UtilTest.java b/service/src/test/java/us/kbase/test/workspace/database/UtilTest.java similarity index 98% rename from src/us/kbase/workspace/test/database/UtilTest.java rename to service/src/test/java/us/kbase/test/workspace/database/UtilTest.java index f1666bb7f..2086d077e 100644 --- a/src/us/kbase/workspace/test/database/UtilTest.java +++ b/service/src/test/java/us/kbase/test/workspace/database/UtilTest.java @@ -1,9 +1,9 @@ -package us.kbase.workspace.test.database; +package us.kbase.test.workspace.database; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; import static org.junit.Assert.fail; -import static us.kbase.common.test.TestCommon.list; +import static us.kbase.test.common.TestCommon.list; import java.util.Map; import java.util.HashMap; @@ -14,7 +14,7 @@ import org.junit.Test; -import us.kbase.common.test.TestCommon; +import us.kbase.test.common.TestCommon; import us.kbase.workspace.database.Util; public class UtilTest { diff --git a/src/us/kbase/workspace/test/database/mongo/GridFSBlobStoreTest.java b/service/src/test/java/us/kbase/test/workspace/database/mongo/GridFSBlobStoreTest.java similarity index 96% rename from src/us/kbase/workspace/test/database/mongo/GridFSBlobStoreTest.java rename to service/src/test/java/us/kbase/test/workspace/database/mongo/GridFSBlobStoreTest.java index 4a0f308cd..c7f63c3fa 100644 --- a/src/us/kbase/workspace/test/database/mongo/GridFSBlobStoreTest.java +++ b/service/src/test/java/us/kbase/test/workspace/database/mongo/GridFSBlobStoreTest.java @@ -1,11 +1,11 @@ -package us.kbase.workspace.test.database.mongo; +package us.kbase.test.workspace.database.mongo; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -import static us.kbase.common.test.TestCommon.assertExceptionCorrect; +import static us.kbase.testutils.TestCommon.assertExceptionCorrect; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -32,8 +32,8 @@ import com.mongodb.client.gridfs.GridFSBuckets; import com.mongodb.client.gridfs.model.GridFSUploadOptions; -import us.kbase.common.test.TestCommon; -import us.kbase.common.test.controllers.mongo.MongoController; +import us.kbase.test.common.TestCommon; +import us.kbase.testutils.controllers.mongo.MongoController; import us.kbase.typedobj.core.MD5; import us.kbase.typedobj.core.Restreamable; import us.kbase.workspace.database.ByteArrayFileCacheManager; @@ -59,7 +59,6 @@ public static void setUpClass() throws Exception { System.out.println("Using Mongo temp dir " + mongo.getTempDir()); TestCommon.stfuLoggers(); - @SuppressWarnings("resource") final MongoClient mongoClient = MongoClients.create("mongodb://localhost:" + mongo.getServerPort()); final MongoDatabase db = mongoClient.getDatabase("GridFSBackendTest"); gfs = GridFSBuckets.create(db); diff --git a/src/us/kbase/workspace/test/database/mongo/MongoInternalsTest.java b/service/src/test/java/us/kbase/test/workspace/database/mongo/MongoInternalsTest.java similarity index 99% rename from src/us/kbase/workspace/test/database/mongo/MongoInternalsTest.java rename to service/src/test/java/us/kbase/test/workspace/database/mongo/MongoInternalsTest.java index d2fe6af53..3fcf134b1 100644 --- a/src/us/kbase/workspace/test/database/mongo/MongoInternalsTest.java +++ b/service/src/test/java/us/kbase/test/workspace/database/mongo/MongoInternalsTest.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.database.mongo; +package us.kbase.test.workspace.database.mongo; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.nullValue; @@ -6,10 +6,10 @@ import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; -import static us.kbase.common.test.TestCommon.now; -import static us.kbase.common.test.TestCommon.assertCloseToNow; -import static us.kbase.common.test.TestCommon.assertExceptionCorrect; -import static us.kbase.workspace.test.WorkspaceTestCommon.basicProv; +import static us.kbase.test.common.TestCommon.assertCloseToNow; +import static us.kbase.test.common.TestCommon.assertExceptionCorrect; +import static us.kbase.test.common.TestCommon.now; +import static us.kbase.test.workspace.WorkspaceTestCommon.basicProv; import java.io.File; import java.lang.reflect.Constructor; @@ -38,9 +38,11 @@ import org.junit.Test; import us.kbase.common.service.UObject; -import us.kbase.common.test.TestCommon; -import us.kbase.common.test.controllers.mongo.MongoController; +import us.kbase.testutils.controllers.mongo.MongoController; import us.kbase.common.utils.sortjson.UTF8JsonSorterFactory; +import us.kbase.test.common.TestCommon; +import us.kbase.test.typedobj.DummyValidatedTypedObject; +import us.kbase.test.workspace.workspace.WorkspaceTester; import us.kbase.typedobj.core.AbsoluteTypeDefId; import us.kbase.typedobj.core.LocalTypeProvider; import us.kbase.typedobj.core.SubsetSelection; @@ -54,7 +56,6 @@ import us.kbase.typedobj.idref.IdReferenceHandlerSetFactoryBuilder; import us.kbase.typedobj.idref.IdReferenceType; import us.kbase.typedobj.idref.RemappedId; -import us.kbase.typedobj.test.DummyValidatedTypedObject; import us.kbase.workspace.database.ObjectIDNoWSNoVer; import us.kbase.workspace.database.ObjectIDResolvedWS; import us.kbase.workspace.database.ObjectIdentifier; @@ -82,7 +83,6 @@ import us.kbase.workspace.database.mongo.MongoWorkspaceDB; import us.kbase.workspace.database.mongo.ObjectSavePackage; import us.kbase.workspace.database.provenance.Provenance; -import us.kbase.workspace.test.workspace.WorkspaceTester; import com.google.common.collect.ImmutableMap; diff --git a/src/us/kbase/workspace/test/database/mongo/MongoStartUpTest.java b/service/src/test/java/us/kbase/test/workspace/database/mongo/MongoStartUpTest.java similarity index 98% rename from src/us/kbase/workspace/test/database/mongo/MongoStartUpTest.java rename to service/src/test/java/us/kbase/test/workspace/database/mongo/MongoStartUpTest.java index eb0386947..ee4a2acfd 100644 --- a/src/us/kbase/workspace/test/database/mongo/MongoStartUpTest.java +++ b/service/src/test/java/us/kbase/test/workspace/database/mongo/MongoStartUpTest.java @@ -1,11 +1,11 @@ -package us.kbase.workspace.test.database.mongo; +package us.kbase.test.workspace.database.mongo; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; import static org.junit.Assert.fail; -import static us.kbase.common.test.TestCommon.assertExceptionCorrect; -import static us.kbase.common.test.TestCommon.set; -import static us.kbase.workspace.test.WorkspaceMongoIndex.getAndNormalizeIndexes; +import static us.kbase.test.common.TestCommon.assertExceptionCorrect; +import static us.kbase.test.common.TestCommon.set; +import static us.kbase.test.workspace.WorkspaceMongoIndex.getAndNormalizeIndexes; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; @@ -29,8 +29,8 @@ import com.mongodb.client.MongoCursor; import com.mongodb.client.MongoDatabase; -import us.kbase.common.test.TestCommon; -import us.kbase.common.test.controllers.mongo.MongoController; +import us.kbase.test.common.TestCommon; +import us.kbase.testutils.controllers.mongo.MongoController; import us.kbase.typedobj.core.TypeDefId; import us.kbase.typedobj.core.TypeDefName; import us.kbase.workspace.database.WorkspaceInformation; diff --git a/src/us/kbase/workspace/test/database/mongo/MongoWorkspaceDBTest.java b/service/src/test/java/us/kbase/test/workspace/database/mongo/MongoWorkspaceDBTest.java similarity index 99% rename from src/us/kbase/workspace/test/database/mongo/MongoWorkspaceDBTest.java rename to service/src/test/java/us/kbase/test/workspace/database/mongo/MongoWorkspaceDBTest.java index c0242c697..b83657177 100644 --- a/src/us/kbase/workspace/test/database/mongo/MongoWorkspaceDBTest.java +++ b/service/src/test/java/us/kbase/test/workspace/database/mongo/MongoWorkspaceDBTest.java @@ -1,15 +1,15 @@ -package us.kbase.workspace.test.database.mongo; +package us.kbase.test.workspace.database.mongo; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -import static us.kbase.common.test.TestCommon.inst; -import static us.kbase.common.test.TestCommon.list; -import static us.kbase.common.test.TestCommon.opt; -import static us.kbase.common.test.TestCommon.set; -import static us.kbase.workspace.test.WorkspaceTestCommon.basicProv; +import static us.kbase.test.common.TestCommon.inst; +import static us.kbase.test.common.TestCommon.list; +import static us.kbase.test.common.TestCommon.opt; +import static us.kbase.test.common.TestCommon.set; +import static us.kbase.test.workspace.WorkspaceTestCommon.basicProv; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -44,16 +44,16 @@ import com.mongodb.client.MongoDatabase; import us.kbase.common.service.UObject; -import us.kbase.common.test.TestCommon; -import us.kbase.common.test.controllers.mongo.MongoController; +import us.kbase.testutils.controllers.mongo.MongoController; import us.kbase.common.utils.sortjson.UTF8JsonSorterFactory; +import us.kbase.test.common.TestCommon; +import us.kbase.test.typedobj.DummyValidatedTypedObject; import us.kbase.typedobj.core.AbsoluteTypeDefId; import us.kbase.typedobj.core.MD5; import us.kbase.typedobj.core.SubsetSelection; import us.kbase.typedobj.core.TypeDefId; import us.kbase.typedobj.core.TypeDefName; import us.kbase.typedobj.exceptions.TypedObjectExtractionException; -import us.kbase.typedobj.test.DummyValidatedTypedObject; import us.kbase.workspace.database.ByteArrayFileCacheManager; import us.kbase.workspace.database.ObjectIDResolvedWS; import us.kbase.workspace.database.ObjectInformation; @@ -117,7 +117,6 @@ public static void setup() throws Exception { System.out.println("Started test mongo instance at localhost:" + MONGO.getServerPort()); - @SuppressWarnings("resource") final MongoClient mc = MongoClients.create("mongodb://localhost:" + MONGO.getServerPort()); MONGO_DB = mc.getDatabase("test_" + MongoWorkspaceDBTest.class.getSimpleName()); diff --git a/src/us/kbase/workspace/test/database/mongo/ObjectListerTest.java b/service/src/test/java/us/kbase/test/workspace/database/mongo/ObjectListerTest.java similarity index 99% rename from src/us/kbase/workspace/test/database/mongo/ObjectListerTest.java rename to service/src/test/java/us/kbase/test/workspace/database/mongo/ObjectListerTest.java index 6a4bbcf9f..867a32c88 100644 --- a/src/us/kbase/workspace/test/database/mongo/ObjectListerTest.java +++ b/service/src/test/java/us/kbase/test/workspace/database/mongo/ObjectListerTest.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.database.mongo; +package us.kbase.test.workspace.database.mongo; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; @@ -8,8 +8,8 @@ import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import static us.kbase.common.test.TestCommon.assertExceptionCorrect; -import static us.kbase.common.test.TestCommon.inst; +import static us.kbase.test.common.TestCommon.assertExceptionCorrect; +import static us.kbase.test.common.TestCommon.inst; import java.util.Arrays; import java.util.BitSet; @@ -32,7 +32,7 @@ import com.mongodb.client.MongoCollection; import com.mongodb.client.MongoCursor; -import us.kbase.common.test.MapBuilder; +import us.kbase.test.common.MapBuilder; import us.kbase.typedobj.core.AbsoluteTypeDefId; import us.kbase.typedobj.core.TypeDefId; import us.kbase.typedobj.core.TypeDefName; diff --git a/src/us/kbase/workspace/test/database/mongo/PartialMock.java b/service/src/test/java/us/kbase/test/workspace/database/mongo/PartialMock.java similarity index 97% rename from src/us/kbase/workspace/test/database/mongo/PartialMock.java rename to service/src/test/java/us/kbase/test/workspace/database/mongo/PartialMock.java index d9e25cb96..a9f125d36 100644 --- a/src/us/kbase/workspace/test/database/mongo/PartialMock.java +++ b/service/src/test/java/us/kbase/test/workspace/database/mongo/PartialMock.java @@ -1,8 +1,8 @@ -package us.kbase.workspace.test.database.mongo; +package us.kbase.test.workspace.database.mongo; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -import static us.kbase.common.test.TestCommon.set; +import static us.kbase.test.common.TestCommon.set; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; diff --git a/src/us/kbase/workspace/test/database/mongo/S3BlobStoreIntegrationTest.java b/service/src/test/java/us/kbase/test/workspace/database/mongo/S3BlobStoreIntegrationTest.java similarity index 97% rename from src/us/kbase/workspace/test/database/mongo/S3BlobStoreIntegrationTest.java rename to service/src/test/java/us/kbase/test/workspace/database/mongo/S3BlobStoreIntegrationTest.java index 8c3a3c1f4..fd2b108fb 100644 --- a/src/us/kbase/workspace/test/database/mongo/S3BlobStoreIntegrationTest.java +++ b/service/src/test/java/us/kbase/test/workspace/database/mongo/S3BlobStoreIntegrationTest.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.database.mongo; +package us.kbase.test.workspace.database.mongo; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.startsWith; @@ -24,8 +24,9 @@ import software.amazon.awssdk.regions.Region; import software.amazon.awssdk.services.s3.model.DeleteBucketRequest; import software.amazon.awssdk.services.s3.model.PutObjectRequest; -import us.kbase.common.test.TestCommon; -import us.kbase.common.test.controllers.mongo.MongoController; +import us.kbase.testutils.controllers.minio.MinioController; +import us.kbase.testutils.controllers.mongo.MongoController; +import us.kbase.test.common.TestCommon; import us.kbase.typedobj.core.MD5; import us.kbase.typedobj.core.Restreamable; import us.kbase.workspace.database.ByteArrayFileCacheManager; @@ -35,7 +36,6 @@ import us.kbase.workspace.database.mongo.S3ClientWithPresign; import us.kbase.workspace.database.mongo.exceptions.BlobStoreCommunicationException; import us.kbase.workspace.database.mongo.exceptions.NoSuchBlobException; -import us.kbase.workspace.test.controllers.minio.MinioController; public class S3BlobStoreIntegrationTest { @@ -68,7 +68,6 @@ public static void setUpClass() throws Exception { System.out.println("Using Mongo temp dir " + mongoCon.getTempDir()); System.out.println("Started mongo server at localhost:" + mongoCon.getServerPort()); - @SuppressWarnings("resource") MongoClient mongoClient = MongoClients.create("mongodb://localhost:" + mongoCon.getServerPort()); mongo = mongoClient.getDatabase("MinioBackendTest"); diff --git a/src/us/kbase/workspace/test/database/mongo/S3BlobStoreTest.java b/service/src/test/java/us/kbase/test/workspace/database/mongo/S3BlobStoreTest.java similarity index 99% rename from src/us/kbase/workspace/test/database/mongo/S3BlobStoreTest.java rename to service/src/test/java/us/kbase/test/workspace/database/mongo/S3BlobStoreTest.java index 78b5e7c69..1541184c2 100644 --- a/src/us/kbase/workspace/test/database/mongo/S3BlobStoreTest.java +++ b/service/src/test/java/us/kbase/test/workspace/database/mongo/S3BlobStoreTest.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.database.mongo; +package us.kbase.test.workspace.database.mongo; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; @@ -12,7 +12,7 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyNoMoreInteractions; import static org.mockito.Mockito.when; -import static us.kbase.common.test.TestCommon.assertLogEventsCorrect; +import static us.kbase.test.common.TestCommon.assertLogEventsCorrect; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -47,8 +47,9 @@ import software.amazon.awssdk.services.s3.model.HeadObjectResponse; import software.amazon.awssdk.services.s3.model.NoSuchKeyException; import software.amazon.awssdk.services.s3.model.PutObjectRequest; -import us.kbase.common.test.TestCommon; -import us.kbase.common.test.TestCommon.LogEvent; +import us.kbase.test.common.TestCommon; +import us.kbase.test.common.TestCommon.LogEvent; +import us.kbase.test.workspace.UpdateOptionsMatcher; import us.kbase.typedobj.core.MD5; import us.kbase.typedobj.core.Restreamable; import us.kbase.workspace.database.ByteArrayFileCacheManager; @@ -59,7 +60,6 @@ import us.kbase.workspace.database.mongo.S3ClientWithPresign; import us.kbase.workspace.database.mongo.exceptions.BlobStoreCommunicationException; import us.kbase.workspace.database.mongo.exceptions.NoSuchBlobException; -import us.kbase.workspace.test.UpdateOptionsMatcher; public class S3BlobStoreTest { diff --git a/src/us/kbase/workspace/test/database/mongo/SchemaUpdaterTest.java b/service/src/test/java/us/kbase/test/workspace/database/mongo/SchemaUpdaterTest.java similarity index 98% rename from src/us/kbase/workspace/test/database/mongo/SchemaUpdaterTest.java rename to service/src/test/java/us/kbase/test/workspace/database/mongo/SchemaUpdaterTest.java index 5fec5968e..f48a531ef 100644 --- a/src/us/kbase/workspace/test/database/mongo/SchemaUpdaterTest.java +++ b/service/src/test/java/us/kbase/test/workspace/database/mongo/SchemaUpdaterTest.java @@ -1,18 +1,17 @@ -package us.kbase.workspace.test.database.mongo; +package us.kbase.test.workspace.database.mongo; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; import static org.junit.Assert.fail; import static org.mockito.Mockito.when; -import static us.kbase.workspace.test.WorkspaceTestCommon.basicProv; -import static us.kbase.workspace.test.WorkspaceMongoIndex.getAndNormalizeIndexes; +import static us.kbase.test.workspace.WorkspaceMongoIndex.getAndNormalizeIndexes; +import static us.kbase.test.workspace.WorkspaceTestCommon.basicProv; import java.nio.file.Paths; import java.time.Instant; import java.util.Arrays; import java.util.Collections; import java.util.Date; -import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Set; @@ -29,8 +28,8 @@ import com.mongodb.client.MongoCollection; import com.mongodb.client.MongoDatabase; -import us.kbase.common.test.TestCommon; -import us.kbase.common.test.controllers.mongo.MongoController; +import us.kbase.test.common.TestCommon; +import us.kbase.testutils.controllers.mongo.MongoController; import us.kbase.workspace.database.ResolvedWorkspaceID; import us.kbase.workspace.database.WorkspaceUser; import us.kbase.workspace.database.WorkspaceUserMetadata; diff --git a/src/us/kbase/workspace/test/database/provenance/ExternalDataTest.java b/service/src/test/java/us/kbase/test/workspace/database/provenance/ExternalDataTest.java similarity index 98% rename from src/us/kbase/workspace/test/database/provenance/ExternalDataTest.java rename to service/src/test/java/us/kbase/test/workspace/database/provenance/ExternalDataTest.java index 9e7d4721f..380779f2d 100644 --- a/src/us/kbase/workspace/test/database/provenance/ExternalDataTest.java +++ b/service/src/test/java/us/kbase/test/workspace/database/provenance/ExternalDataTest.java @@ -1,19 +1,18 @@ -package us.kbase.workspace.test.database.provenance; +package us.kbase.test.workspace.database.provenance; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; import static org.junit.Assert.fail; -import static us.kbase.common.test.TestCommon.opt; -import static us.kbase.common.test.TestCommon.inst; -import static us.kbase.common.test.TestCommon.ES; +import static us.kbase.test.common.TestCommon.ES; +import static us.kbase.test.common.TestCommon.inst; +import static us.kbase.test.common.TestCommon.opt; import java.net.URL; import java.time.Instant; import java.util.Optional; import org.junit.Test; import nl.jqno.equalsverifier.EqualsVerifier; - -import us.kbase.common.test.TestCommon; +import us.kbase.test.common.TestCommon; import us.kbase.workspace.database.provenance.ExternalData; public class ExternalDataTest { diff --git a/src/us/kbase/workspace/test/database/provenance/ProvenanceActionTest.java b/service/src/test/java/us/kbase/test/workspace/database/provenance/ProvenanceActionTest.java similarity index 99% rename from src/us/kbase/workspace/test/database/provenance/ProvenanceActionTest.java rename to service/src/test/java/us/kbase/test/workspace/database/provenance/ProvenanceActionTest.java index d5724c47d..7b821c0b7 100644 --- a/src/us/kbase/workspace/test/database/provenance/ProvenanceActionTest.java +++ b/service/src/test/java/us/kbase/test/workspace/database/provenance/ProvenanceActionTest.java @@ -1,11 +1,11 @@ -package us.kbase.workspace.test.database.provenance; +package us.kbase.test.workspace.database.provenance; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; import static org.junit.Assert.fail; -import static us.kbase.common.test.TestCommon.inst; -import static us.kbase.common.test.TestCommon.list; -import static us.kbase.common.test.TestCommon.opt; +import static us.kbase.test.common.TestCommon.inst; +import static us.kbase.test.common.TestCommon.list; +import static us.kbase.test.common.TestCommon.opt; import java.io.ByteArrayOutputStream; import java.time.Instant; @@ -22,8 +22,8 @@ import com.google.common.collect.ImmutableMap; import nl.jqno.equalsverifier.EqualsVerifier; -import us.kbase.common.test.MapBuilder; -import us.kbase.common.test.TestCommon; +import us.kbase.test.common.MapBuilder; +import us.kbase.test.common.TestCommon; import us.kbase.workspace.database.WorkspaceUser; import us.kbase.workspace.database.provenance.ExternalData; import us.kbase.workspace.database.provenance.ProvenanceAction; diff --git a/src/us/kbase/workspace/test/database/provenance/ProvenanceTest.java b/service/src/test/java/us/kbase/test/workspace/database/provenance/ProvenanceTest.java similarity index 97% rename from src/us/kbase/workspace/test/database/provenance/ProvenanceTest.java rename to service/src/test/java/us/kbase/test/workspace/database/provenance/ProvenanceTest.java index 3ac584850..6e5e9e0c3 100644 --- a/src/us/kbase/workspace/test/database/provenance/ProvenanceTest.java +++ b/service/src/test/java/us/kbase/test/workspace/database/provenance/ProvenanceTest.java @@ -1,10 +1,10 @@ -package us.kbase.workspace.test.database.provenance; +package us.kbase.test.workspace.database.provenance; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; import static org.junit.Assert.fail; -import static us.kbase.common.test.TestCommon.inst; -import static us.kbase.common.test.TestCommon.list; +import static us.kbase.test.common.TestCommon.inst; +import static us.kbase.test.common.TestCommon.list; import java.time.Instant; import java.util.Collections; @@ -13,7 +13,7 @@ import org.junit.Test; import nl.jqno.equalsverifier.EqualsVerifier; -import us.kbase.common.test.TestCommon; +import us.kbase.test.common.TestCommon; import us.kbase.workspace.database.WorkspaceUser; import us.kbase.workspace.database.provenance.Provenance; import us.kbase.workspace.database.provenance.ProvenanceAction; diff --git a/src/us/kbase/workspace/test/database/provenance/SubActionTest.java b/service/src/test/java/us/kbase/test/workspace/database/provenance/SubActionTest.java similarity index 98% rename from src/us/kbase/workspace/test/database/provenance/SubActionTest.java rename to service/src/test/java/us/kbase/test/workspace/database/provenance/SubActionTest.java index e5b1a098b..48f0b8712 100644 --- a/src/us/kbase/workspace/test/database/provenance/SubActionTest.java +++ b/service/src/test/java/us/kbase/test/workspace/database/provenance/SubActionTest.java @@ -1,10 +1,10 @@ -package us.kbase.workspace.test.database.provenance; +package us.kbase.test.workspace.database.provenance; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; import static org.junit.Assert.fail; -import static us.kbase.common.test.TestCommon.opt; -import static us.kbase.common.test.TestCommon.ES; +import static us.kbase.test.common.TestCommon.ES; +import static us.kbase.test.common.TestCommon.opt; import java.net.URL; import java.util.Optional; @@ -12,7 +12,7 @@ import org.junit.Test; import nl.jqno.equalsverifier.EqualsVerifier; -import us.kbase.common.test.TestCommon; +import us.kbase.test.common.TestCommon; import us.kbase.workspace.database.provenance.SubAction; public class SubActionTest { diff --git a/src/us/kbase/workspace/test/docserver/DocServerTest.java b/service/src/test/java/us/kbase/test/workspace/docserver/DocServerTest.java similarity index 97% rename from src/us/kbase/workspace/test/docserver/DocServerTest.java rename to service/src/test/java/us/kbase/test/workspace/docserver/DocServerTest.java index 269d67ffb..35c780881 100644 --- a/src/us/kbase/workspace/test/docserver/DocServerTest.java +++ b/service/src/test/java/us/kbase/test/workspace/docserver/DocServerTest.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.docserver; +package us.kbase.test.workspace.docserver; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.startsWith; @@ -37,7 +37,7 @@ import us.kbase.common.service.JsonServerSyslog; import us.kbase.common.service.JsonServerSyslog.SyslogOutput; -import us.kbase.common.test.TestCommon; +import us.kbase.test.common.TestCommon; import us.kbase.workspace.docserver.DocServer; public class DocServerTest { @@ -76,7 +76,7 @@ public static void setUpClass() throws Exception { .toAbsolutePath()); server = createServer("TestDocServer", - "/us/kbase/workspace/test/docserver"); + "/us/kbase/test/workspace/docserver"); iniFile = new File(TestCommon.getenv().get("KB_DEPLOYMENT_CONFIG")); docURL = getServerURL(server); System.out.println("Started doc server at " + docURL); @@ -228,31 +228,31 @@ public void beforeTest() throws Exception { @Test public void serverNameNull() throws Exception { - checkStartup(null, "DocServ", "/us/kbase/workspace/test/docserver", CT_HTML, + checkStartup(null, "DocServ", "/us/kbase/test/workspace/docserver", CT_HTML, IDX1_CONTENTS); } @Test public void serverNameEmpty() throws Exception { - checkStartup("", "DocServ", "/us/kbase/workspace/test/docserver", CT_HTML, IDX1_CONTENTS); + checkStartup("", "DocServ", "/us/kbase/test/workspace/docserver", CT_HTML, IDX1_CONTENTS); } @Test public void docsLocNull() throws Exception { - DocServer.setDefaultDocsLocation("/us/kbase/workspace/test/docserver/files"); + DocServer.setDefaultDocsLocation("/us/kbase/test/workspace/docserver/files"); checkStartup("WhooptyWoo", "WhooptyWoo", null, CT_HTML, IDX2_CONTENTS); } @Test public void docsLocEmpty() throws Exception { - DocServer.setDefaultDocsLocation("/us/kbase/workspace/test/docserver/files"); + DocServer.setDefaultDocsLocation("/us/kbase/test/workspace/docserver/files"); checkStartup("WhooptyWoo", "WhooptyWoo", "", CT_HTML, IDX2_CONTENTS); } @Test public void docsLocNoSlash() throws Exception { checkStartup("WhooptyWoo", "WhooptyWoo", - "us/kbase/workspace/test/docserver/files", CT_HTML, IDX2_CONTENTS); + "us/kbase/test/workspace/docserver/files", CT_HTML, IDX2_CONTENTS); } private void checkStartup( diff --git a/src/us/kbase/workspace/test/docserver/HttpServletRequestMock.java b/service/src/test/java/us/kbase/test/workspace/docserver/HttpServletRequestMock.java similarity index 99% rename from src/us/kbase/workspace/test/docserver/HttpServletRequestMock.java rename to service/src/test/java/us/kbase/test/workspace/docserver/HttpServletRequestMock.java index eb83baccb..5e3e6b9fb 100644 --- a/src/us/kbase/workspace/test/docserver/HttpServletRequestMock.java +++ b/service/src/test/java/us/kbase/test/workspace/docserver/HttpServletRequestMock.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.docserver; +package us.kbase.test.workspace.docserver; import java.io.BufferedReader; import java.io.IOException; diff --git a/src/us/kbase/workspace/test/docserver/HttpServletResponseMock.java b/service/src/test/java/us/kbase/test/workspace/docserver/HttpServletResponseMock.java similarity index 98% rename from src/us/kbase/workspace/test/docserver/HttpServletResponseMock.java rename to service/src/test/java/us/kbase/test/workspace/docserver/HttpServletResponseMock.java index 746f7660d..9ee5728ea 100644 --- a/src/us/kbase/workspace/test/docserver/HttpServletResponseMock.java +++ b/service/src/test/java/us/kbase/test/workspace/docserver/HttpServletResponseMock.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.docserver; +package us.kbase.test.workspace.docserver; import java.io.IOException; import java.io.PrintWriter; diff --git a/src/us/kbase/workspace/test/kbase/ArgUtilsTest.java b/service/src/test/java/us/kbase/test/workspace/kbase/ArgUtilsTest.java similarity index 99% rename from src/us/kbase/workspace/test/kbase/ArgUtilsTest.java rename to service/src/test/java/us/kbase/test/workspace/kbase/ArgUtilsTest.java index f33a7626e..364735746 100644 --- a/src/us/kbase/workspace/test/kbase/ArgUtilsTest.java +++ b/service/src/test/java/us/kbase/test/workspace/kbase/ArgUtilsTest.java @@ -1,12 +1,12 @@ -package us.kbase.workspace.test.kbase; +package us.kbase.test.workspace.kbase; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; import static org.junit.Assert.fail; +import static us.kbase.test.common.TestCommon.inst; +import static us.kbase.test.common.TestCommon.list; import static us.kbase.workspace.kbase.ArgUtils.chooseInstant; import static us.kbase.workspace.kbase.ArgUtils.processProvenance; -import static us.kbase.common.test.TestCommon.inst; -import static us.kbase.common.test.TestCommon.list; import java.time.Instant; import java.util.HashMap; @@ -18,7 +18,7 @@ import com.google.common.collect.ImmutableMap; import us.kbase.common.service.UObject; -import us.kbase.common.test.TestCommon; +import us.kbase.test.common.TestCommon; import us.kbase.workspace.ExternalDataUnit; import us.kbase.workspace.database.WorkspaceUser; import us.kbase.workspace.database.provenance.ExternalData; diff --git a/src/us/kbase/workspace/test/kbase/BytestreamIdHandlerFactoryTest.java b/service/src/test/java/us/kbase/test/workspace/kbase/BytestreamIdHandlerFactoryTest.java similarity index 99% rename from src/us/kbase/workspace/test/kbase/BytestreamIdHandlerFactoryTest.java rename to service/src/test/java/us/kbase/test/workspace/kbase/BytestreamIdHandlerFactoryTest.java index f362e0a1d..cdfb5097f 100644 --- a/src/us/kbase/workspace/test/kbase/BytestreamIdHandlerFactoryTest.java +++ b/service/src/test/java/us/kbase/test/workspace/kbase/BytestreamIdHandlerFactoryTest.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.kbase; +package us.kbase.test.workspace.kbase; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; @@ -12,7 +12,7 @@ import static org.mockito.Mockito.verifyNoMoreInteractions; import static org.mockito.Mockito.verifyZeroInteractions; import static org.mockito.Mockito.when; -import static us.kbase.common.test.TestCommon.set; +import static us.kbase.test.common.TestCommon.set; import java.io.IOException; import java.util.Arrays; @@ -25,7 +25,6 @@ import org.junit.Test; import us.kbase.auth.AuthToken; -import us.kbase.common.test.TestCommon; import us.kbase.shock.client.BasicShockClient; import us.kbase.shock.client.ShockACL; import us.kbase.shock.client.ShockACLType; @@ -35,6 +34,7 @@ import us.kbase.shock.client.exceptions.ShockAuthorizationException; import us.kbase.shock.client.exceptions.ShockHttpException; import us.kbase.shock.client.exceptions.ShockNoNodeException; +import us.kbase.test.common.TestCommon; import us.kbase.typedobj.idref.IdReferenceType; import us.kbase.typedobj.idref.SimpleRemappedId; import us.kbase.typedobj.idref.IdReferenceHandlerSet.IdReferenceException; diff --git a/src/us/kbase/workspace/test/kbase/DelegatingTypeProviderTest.java b/service/src/test/java/us/kbase/test/workspace/kbase/DelegatingTypeProviderTest.java similarity index 99% rename from src/us/kbase/workspace/test/kbase/DelegatingTypeProviderTest.java rename to service/src/test/java/us/kbase/test/workspace/kbase/DelegatingTypeProviderTest.java index 6d51c19da..a73160778 100644 --- a/src/us/kbase/workspace/test/kbase/DelegatingTypeProviderTest.java +++ b/service/src/test/java/us/kbase/test/workspace/kbase/DelegatingTypeProviderTest.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.kbase; +package us.kbase.test.workspace.kbase; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; @@ -7,8 +7,8 @@ import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import static us.kbase.common.test.TestCommon.list; -import static us.kbase.common.test.TestCommon.LONG1001; +import static us.kbase.test.common.TestCommon.LONG1001; +import static us.kbase.test.common.TestCommon.list; import java.io.IOException; import java.util.List; @@ -20,7 +20,7 @@ import us.kbase.common.service.JsonClientException; import us.kbase.common.service.ServerException; -import us.kbase.common.test.TestCommon; +import us.kbase.test.common.TestCommon; import us.kbase.typedobj.core.AbsoluteTypeDefId; import us.kbase.typedobj.core.MD5; import us.kbase.typedobj.core.TypeDefId; diff --git a/src/us/kbase/workspace/test/kbase/HandleAndBytestreamIntegrationTest.java b/service/src/test/java/us/kbase/test/workspace/kbase/HandleAndBytestreamIntegrationTest.java similarity index 95% rename from src/us/kbase/workspace/test/kbase/HandleAndBytestreamIntegrationTest.java rename to service/src/test/java/us/kbase/test/workspace/kbase/HandleAndBytestreamIntegrationTest.java index 3a201eb37..c91d221cb 100644 --- a/src/us/kbase/workspace/test/kbase/HandleAndBytestreamIntegrationTest.java +++ b/service/src/test/java/us/kbase/test/workspace/kbase/HandleAndBytestreamIntegrationTest.java @@ -1,12 +1,13 @@ -package us.kbase.workspace.test.kbase; +package us.kbase.test.workspace.kbase; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.nullValue; import static org.hamcrest.CoreMatchers.startsWith; import static org.junit.Assert.assertThat; import static org.junit.Assert.fail; -import static us.kbase.common.test.TestCommon.set; -import static us.kbase.workspace.test.kbase.JSONRPCLayerTester.administerCommand; +import static us.kbase.test.common.TestCommon.list; +import static us.kbase.test.common.TestCommon.set; +import static us.kbase.test.workspace.kbase.JSONRPCLayerTester.administerCommand; import java.io.ByteArrayInputStream; import java.io.File; @@ -38,12 +39,12 @@ import us.kbase.abstracthandle.AbstractHandleClient; import us.kbase.abstracthandle.Handle; import us.kbase.auth.AuthToken; -import us.kbase.common.mongo.exceptions.InvalidHostException; import us.kbase.common.service.ServerException; import us.kbase.common.service.UObject; -import us.kbase.common.test.TestCommon; -import us.kbase.common.test.TestException; -import us.kbase.common.test.controllers.mongo.MongoController; +import us.kbase.testutils.TestException; +import us.kbase.testutils.controllers.blobstore.BlobstoreController; +import us.kbase.testutils.controllers.minio.MinioController; +import us.kbase.testutils.controllers.mongo.MongoController; import us.kbase.shock.client.BasicShockClient; import us.kbase.shock.client.ShockACLType; import us.kbase.shock.client.ShockFileInformation; @@ -51,6 +52,9 @@ import us.kbase.shock.client.ShockNodeId; import us.kbase.shock.client.ShockUserId; import us.kbase.test.auth2.authcontroller.AuthController; +import us.kbase.test.common.TestCommon; +import us.kbase.test.workspace.WorkspaceServerThread; +import us.kbase.test.workspace.controllers.handle.HandleServiceController; import us.kbase.typedobj.idref.IdReference; import us.kbase.typedobj.idref.IdReferenceHandlerSet; import us.kbase.typedobj.idref.IdReferenceHandlerSet.TooManyIdsException; @@ -70,10 +74,6 @@ import us.kbase.workspace.WorkspaceClient; import us.kbase.workspace.WorkspaceServer; import us.kbase.workspace.kbase.HandleIdHandlerFactory; -import us.kbase.workspace.test.WorkspaceServerThread; -import us.kbase.workspace.test.controllers.blobstore.BlobstoreController; -import us.kbase.workspace.test.controllers.handle.HandleServiceController; -import us.kbase.workspace.test.controllers.minio.MinioController; public class HandleAndBytestreamIntegrationTest { @@ -294,7 +294,7 @@ private static WorkspaceServer startupWorkspaceServer( final String miniohost, final String minioUser, final String minioKey) - throws InvalidHostException, UnknownHostException, IOException, + throws UnknownHostException, IOException, NoSuchFieldException, IllegalAccessException, Exception, InterruptedException { @@ -370,32 +370,24 @@ public static void tearDownClass() throws Exception { @Test public void status() throws Exception { + // only test the parts of the status that are relevant for the handle & blobstore services final Map st = CLIENT1.status(); //top level items - assertThat("incorrect state", st.get("state"), is((Object) "OK")); - assertThat("incorrect message", st.get("message"), is((Object) "OK")); - // should throw an error if not a valid semver - Version.valueOf((String) st.get("version")); - assertThat("incorrect git url", st.get("git_url"), - is((Object) "https://github.com/kbase/workspace_deluxe")); - checkMem(st.get("freemem"), "freemem"); - checkMem(st.get("totalmem"), "totalmem"); - checkMem(st.get("maxmem"), "maxmem"); + assertThat("incorrect state", st.get("state"), is("OK")); //deps @SuppressWarnings("unchecked") - final List> deps = - (List>) st.get("dependencies"); + final List> deps = (List>) st.get("dependencies"); assertThat("missing dependencies", deps.size(), is(4)); final Iterator> gotiter = deps.iterator(); - for (final String name: Arrays.asList( + for (final String name: list( "MongoDB", "S3", "Linked Shock for IDs", "Handle service")) { final Map g = gotiter.next(); - assertThat("incorrect name", (String) g.get("name"), is(name)); - assertThat("incorrect state", g.get("state"), is((Object) "OK")); - assertThat("incorrect message", g.get("message"), is((Object) "OK")); + assertThat("incorrect name", g.get("name"), is(name)); + assertThat("incorrect state", g.get("state"), is("OK")); + assertThat("incorrect message", g.get("message"), is("OK")); if (name.equals("S3")) { assertThat("incorrect version", g.get("version"), is("Unknown")); } else { @@ -404,15 +396,6 @@ public void status() throws Exception { } } - private void checkMem(final Object num, final String name) - throws Exception { - if (num instanceof Integer) { - assertThat("bad " + name, (Integer) num > 0, is(true)); - } else { - assertThat("bad " + name, (Long) num > 0, is(true)); - } - } - @SuppressWarnings("deprecation") @Test public void basicHandleTest() throws Exception { @@ -820,12 +803,10 @@ public void saveAndGetWithBytestreamIDs() throws Exception { is(set(n1.getId().getId(), n2.getId().getId()))); // check nodes have the same contents - // TODO BLOBSTORE update tests when https://github.com/kbase/shock_java_client/issues/26 - // is fixed checkNode(WS_OWNED_BLOB, n1.getId(), ImmutableMap.of("foo", "bar"), - "contents", "fname", null); // "text"); + "contents", "fname", "text"); checkNode(WS_OWNED_BLOB, n2.getId(), ImmutableMap.of("foo", "bar2"), - "contents2", "fname2", null); //"text2"); + "contents2", "fname2", "text2"); checkPublicRead(n1, false); checkPublicRead(n2, false); @@ -851,7 +832,7 @@ private void checkNode( final ShockNode sn = cli.getNode(id); final ShockFileInformation fi = sn.getFileInformation(); assertThat("incorrect filename", fi.getName(), is(filename)); - assertThat("incorrect format", fi.getFormat(), is(format)); + assertThat("incorrect format", sn.getFormat(), is(format)); assertThat("incorrect file", IOUtils.toString(sn.getFile()), is(file)); } diff --git a/src/us/kbase/workspace/test/kbase/HandleIdHandlerFactoryTest.java b/service/src/test/java/us/kbase/test/workspace/kbase/HandleIdHandlerFactoryTest.java similarity index 98% rename from src/us/kbase/workspace/test/kbase/HandleIdHandlerFactoryTest.java rename to service/src/test/java/us/kbase/test/workspace/kbase/HandleIdHandlerFactoryTest.java index 7069b39a0..08b96d8d9 100644 --- a/src/us/kbase/workspace/test/kbase/HandleIdHandlerFactoryTest.java +++ b/service/src/test/java/us/kbase/test/workspace/kbase/HandleIdHandlerFactoryTest.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.kbase; +package us.kbase.test.workspace.kbase; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; @@ -8,7 +8,7 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyZeroInteractions; import static org.mockito.Mockito.when; -import static us.kbase.common.test.TestCommon.set; +import static us.kbase.test.common.TestCommon.set; import java.io.IOException; import java.util.Arrays; @@ -19,11 +19,11 @@ import com.google.common.collect.ImmutableMap; +import us.kbase.abstracthandle.AbstractHandleClient; import us.kbase.common.service.JsonClientException; import us.kbase.common.service.ServerException; import us.kbase.common.service.UnauthorizedException; -import us.kbase.common.test.TestCommon; -import us.kbase.abstracthandle.AbstractHandleClient; +import us.kbase.test.common.TestCommon; import us.kbase.typedobj.idref.IdReferencePermissionHandlerSet.IdReferencePermissionHandler; import us.kbase.typedobj.idref.IdReferencePermissionHandlerSet.IdReferencePermissionHandlerException; import us.kbase.typedobj.idref.IdReferenceType; diff --git a/src/us/kbase/workspace/test/kbase/IdentifierUtilsTest.java b/service/src/test/java/us/kbase/test/workspace/kbase/IdentifierUtilsTest.java similarity index 99% rename from src/us/kbase/workspace/test/kbase/IdentifierUtilsTest.java rename to service/src/test/java/us/kbase/test/workspace/kbase/IdentifierUtilsTest.java index 82826dbf6..4829b165c 100644 --- a/src/us/kbase/workspace/test/kbase/IdentifierUtilsTest.java +++ b/service/src/test/java/us/kbase/test/workspace/kbase/IdentifierUtilsTest.java @@ -1,13 +1,13 @@ -package us.kbase.workspace.test.kbase; +package us.kbase.test.workspace.kbase; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; import static org.junit.Assert.fail; -import static us.kbase.common.test.TestCommon.ES; -import static us.kbase.common.test.TestCommon.EL; -import static us.kbase.common.test.TestCommon.EI; -import static us.kbase.common.test.TestCommon.opt; -import static us.kbase.common.test.TestCommon.optn; +import static us.kbase.test.common.TestCommon.EI; +import static us.kbase.test.common.TestCommon.EL; +import static us.kbase.test.common.TestCommon.ES; +import static us.kbase.test.common.TestCommon.opt; +import static us.kbase.test.common.TestCommon.optn; import java.util.Arrays; import java.util.Collections; @@ -17,7 +17,7 @@ import org.junit.Test; -import us.kbase.common.test.TestCommon; +import us.kbase.test.common.TestCommon; import us.kbase.typedobj.core.SubsetSelection; import us.kbase.workspace.ObjectIdentity; import us.kbase.workspace.ObjectSpecification; diff --git a/src/us/kbase/workspace/test/kbase/JSONRPCLayerLongTest.java b/service/src/test/java/us/kbase/test/workspace/kbase/JSONRPCLayerLongTest.java similarity index 99% rename from src/us/kbase/workspace/test/kbase/JSONRPCLayerLongTest.java rename to service/src/test/java/us/kbase/test/workspace/kbase/JSONRPCLayerLongTest.java index a97c4fdcf..9cd3c2c8a 100644 --- a/src/us/kbase/workspace/test/kbase/JSONRPCLayerLongTest.java +++ b/service/src/test/java/us/kbase/test/workspace/kbase/JSONRPCLayerLongTest.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.kbase; +package us.kbase.test.workspace.kbase; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; @@ -30,6 +30,7 @@ import us.kbase.kidl.KbStruct; import us.kbase.kidl.KbStructItem; import us.kbase.kidl.KbType; +import us.kbase.test.workspace.workspace.WorkspaceTest; import us.kbase.workspace.CreateWorkspaceParams; import us.kbase.workspace.GetObjects2Params; import us.kbase.workspace.ObjectData; @@ -37,7 +38,6 @@ import us.kbase.workspace.ObjectSpecification; import us.kbase.workspace.RegisterTypespecParams; import us.kbase.workspace.SaveObjectsParams; -import us.kbase.workspace.test.workspace.WorkspaceTest; import com.fasterxml.jackson.core.JsonEncoding; import com.fasterxml.jackson.core.JsonGenerator; diff --git a/src/us/kbase/workspace/test/kbase/JSONRPCLayerTest.java b/service/src/test/java/us/kbase/test/workspace/kbase/JSONRPCLayerTest.java similarity index 98% rename from src/us/kbase/workspace/test/kbase/JSONRPCLayerTest.java rename to service/src/test/java/us/kbase/test/workspace/kbase/JSONRPCLayerTest.java index a47c90fcd..6fff90bc5 100644 --- a/src/us/kbase/workspace/test/kbase/JSONRPCLayerTest.java +++ b/service/src/test/java/us/kbase/test/workspace/kbase/JSONRPCLayerTest.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.kbase; +package us.kbase.test.workspace.kbase; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.containsString; @@ -7,8 +7,9 @@ import static org.junit.Assert.assertNull; import static org.junit.Assert.assertThat; import static org.junit.Assert.fail; -import static us.kbase.common.test.TestCommon.assertExceptionCorrect; -import static us.kbase.common.test.TestCommon.list; +import static us.kbase.test.common.TestCommon.assertExceptionCorrect; +import static us.kbase.test.common.TestCommon.list; +import static us.kbase.test.common.TestCommon.set; import java.io.InputStream; import java.net.HttpURLConnection; @@ -33,7 +34,6 @@ import org.apache.commons.codec.digest.DigestUtils; import org.junit.Test; -import us.kbase.auth.AuthUser; import us.kbase.common.service.JsonTokenStream; import us.kbase.common.service.ServerException; import us.kbase.common.service.Tuple11; @@ -101,7 +101,7 @@ */ public class JSONRPCLayerTest extends JSONRPCLayerTester { - private static final String VER = "0.14.3"; + private static final String VER = "0.15.0"; @Test public void ver() throws Exception { @@ -111,35 +111,40 @@ public void ver() throws Exception { @Test public void status() throws Exception { final Map st = CLIENT1.status(); + + assertThat("incorrect status keys", st.keySet(), is(set( + "state", "message", "dependencies", "version", "git_url", "git_commit", + "freemem", "totalmem", "maxmem"))); //top level items - assertThat("incorrect state", st.get("state"), is((Object) "OK")); - assertThat("incorrect message", st.get("message"), is((Object) "OK")); + assertThat("incorrect state", st.get("state"), is("OK")); + assertThat("incorrect message", st.get("message"), is("OK")); assertThat("incorrect version", st.get("version"), is(VER)); assertThat("incorrect git url", st.get("git_url"), - is((Object) "https://github.com/kbase/workspace_deluxe")); + is("https://github.com/kbase/workspace_deluxe")); + final String gc = (String) st.get("git_commit"); + if (gc.length() == 40) { // it's a git hash, probably running from gradle + assertThat("is SHA1 hash", gc.matches("^[a-fA-F0-9]{40}$"), is(true)); + } else { // probably running from an IDE + assertThat("incorrect git commit", st.get("git_commit"), + is("Missing git commit file gitcommit, " + + "should be in us.kbase.workspace.gitcommit")); + } checkMem(st.get("freemem"), "freemem"); checkMem(st.get("totalmem"), "totalmem"); checkMem(st.get("maxmem"), "maxmem"); //deps @SuppressWarnings("unchecked") - final List> deps = - (List>) st.get("dependencies"); + final List> deps = (List>) st.get("dependencies"); assertThat("missing dependencies", deps.size(), is(2)); - final List exp = new ArrayList(); - exp.add("MongoDB"); - exp.add("GridFS"); - final Iterator expiter = exp.iterator(); final Iterator> gotiter = deps.iterator(); - while (expiter.hasNext()) { + for (final String name: list("MongoDB", "GridFS")) { final Map g = gotiter.next(); - assertThat("incorrect name", (String) g.get("name"), - is(expiter.next())); - assertThat("incorrect state", g.get("state"), is((Object) "OK")); - assertThat("incorrect message", g.get("message"), - is((Object) "OK")); + assertThat("incorrect name", g.get("name"), is(name)); + assertThat("incorrect state", g.get("state"), is("OK")); + assertThat("incorrect message", g.get("message"), is("OK")); Version.valueOf((String) g.get("version")); } } @@ -1438,7 +1443,7 @@ public void deprecatedMethods() throws Exception { .withId(wsid), "depsave", USER1, wsinfo.getE4(), 0, "a", "n", wsid); checkDepWSMeta(new us.kbase.workspace.GetWorkspacemetaParams() - .withWorkspace("depsave").withAuth(AUTH_USER2.getTokenString()), + .withWorkspace("depsave").withAuth(TOKEN2), "depsave", USER1, wsinfo.getE4(), 0, "w", "n", wsid); Tuple7 wsmeta = @@ -1480,7 +1485,7 @@ public void deprecatedMethods() throws Exception { Tuple12, Long> obj3 = CLIENT1.saveObject(new us.kbase.workspace.SaveObjectParams().withId("obj3") .withMetadata(meta2).withType(SAFE_TYPE).withWorkspace("depsave") - .withData(new UObject(data)).withAuth(AUTH_USER2.getTokenString())); + .withData(new UObject(data)).withAuth(TOKEN2)); checkDeprecatedSaveInfo(obj1, 1, "obj1", SAFE_TYPE, 1, USER1, wsid, "depsave", "36c4f68f2c98971b9736839232eb08f4", meta); checkDeprecatedSaveInfo(obj2, 2, "obj2", anotherType, 1, USER1, wsid, "depsave", "3c59f762140806c36ab48a152f28e840", meta2); @@ -1489,33 +1494,27 @@ public void deprecatedMethods() throws Exception { checkSavedObjectDep(new ObjectIdentity().withWorkspace("depsave").withName("obj1"), new ObjectIdentity().withWsid(wsid).withObjid(1L), 1, "obj1", SAFE_TYPE, 1, USER1, wsid, "depsave", "36c4f68f2c98971b9736839232eb08f4", - 23, meta, data, AUTH_USER2); + 23, meta, data, TOKEN2); checkSavedObjectDep(new ObjectIdentity().withWorkspace("depsave").withName("obj2"), new ObjectIdentity().withWsid(wsid).withObjid(2L), 2, "obj2", anotherType, 1, USER1, wsid, "depsave", "3c59f762140806c36ab48a152f28e840", - 24, meta2, data2, AUTH_USER2); + 24, meta2, data2, TOKEN2); checkSavedObjectDep(new ObjectIdentity().withWorkspace("depsave").withName("obj3"), new ObjectIdentity().withWsid(wsid).withObjid(3L), 3, "obj3", SAFE_TYPE, 1, USER2, wsid, "depsave", "36c4f68f2c98971b9736839232eb08f4", - 23, meta2, data, AUTH_USER2); + 23, meta2, data, TOKEN2); checkListObjectsDep("depsave", null, null, null, Arrays.asList(obj1, obj2, obj3)); checkListObjectsDep("depsave", anotherType, null, null, Arrays.asList(obj2)); CLIENT1.deleteObjects(Arrays.asList(new ObjectIdentity().withName("obj2").withWorkspace("depsave"))); checkListObjectsDep("depsave", null, 0L, null, Arrays.asList(obj1, obj3)); checkListObjectsDep("depsave", null, 1L, null, Arrays.asList(obj1, obj2, obj3)); - checkListObjectsDep("depsave", null, null, AUTH_USER2.getTokenString(), Arrays.asList(obj1, obj3)); + checkListObjectsDep("depsave", null, null, TOKEN2, Arrays.asList(obj1, obj3)); - String invalidToken = AUTH_USER2.getTokenString() + "a"; + String invalidToken = TOKEN2 + "a"; String badFormatToken = "borkborkbork"; - // old auth service -// String invalidTokenExp = -// "Login failed! Server responded with code 401 UNAUTHORIZED"; -// String badFormatTokenExp = "Login failed! Invalid token"; - // new auth service String invalidTokenExp = - "Login failed! Server responded with code 401 Unauthorized"; - String badFormatTokenExp = invalidTokenExp; + "Auth service returned an error: 10020 Invalid token"; failDepGetWSmeta(new us.kbase.workspace.GetWorkspacemetaParams() @@ -1523,12 +1522,12 @@ public void deprecatedMethods() throws Exception { invalidTokenExp); failDepGetWSmeta(new us.kbase.workspace.GetWorkspacemetaParams() .withWorkspace("depsave").withAuth(badFormatToken), - badFormatTokenExp); + invalidTokenExp); failDepListWs(new us.kbase.workspace.ListWorkspacesParams() .withAuth(invalidToken), invalidTokenExp); failDepListWs(new us.kbase.workspace.ListWorkspacesParams() - .withAuth(badFormatToken), badFormatTokenExp); + .withAuth(badFormatToken), invalidTokenExp); failDepSaveObject(new us.kbase.workspace.SaveObjectParams().withId("obj3") .withMetadata(meta2).withType(SAFE_TYPE).withWorkspace("depsave") @@ -1537,21 +1536,21 @@ public void deprecatedMethods() throws Exception { failDepSaveObject(new us.kbase.workspace.SaveObjectParams().withId("obj3") .withMetadata(meta2).withType(SAFE_TYPE).withWorkspace("depsave") .withData(new UObject(data)).withAuth(badFormatToken), - badFormatTokenExp); + invalidTokenExp); failDepGetObject(new us.kbase.workspace.GetObjectParams() .withWorkspace("depsave").withId("obj3").withAuth(invalidToken), invalidTokenExp); failDepGetObject(new us.kbase.workspace.GetObjectParams() .withWorkspace("depsave").withId("obj3").withAuth(badFormatToken), - badFormatTokenExp); + invalidTokenExp); failDepGetObjectmeta(new us.kbase.workspace.GetObjectmetaParams() .withWorkspace("depsave").withId("obj3").withAuth(invalidToken), invalidTokenExp); failDepGetObjectmeta(new us.kbase.workspace.GetObjectmetaParams() .withWorkspace("depsave").withId("obj3").withAuth(badFormatToken), - badFormatTokenExp); + invalidTokenExp); failDepListObjects(new us.kbase.workspace.ListWorkspaceObjectsParams() .withWorkspace("depsave").withType("thisisabadtype"), @@ -1561,7 +1560,7 @@ public void deprecatedMethods() throws Exception { invalidTokenExp); failDepListObjects(new us.kbase.workspace.ListWorkspaceObjectsParams() .withWorkspace("depsave").withAuth(badFormatToken), - badFormatTokenExp); + invalidTokenExp); } @SuppressWarnings("deprecation") @@ -1744,10 +1743,18 @@ private void failDepGetObject(us.kbase.workspace.GetObjectParams gop, String exp @SuppressWarnings("deprecation") private void checkSavedObjectDep(ObjectIdentity objnames, ObjectIdentity objids, - long id, - String name, String type, int ver, String user, long wsid, - String wsname, String chksum, int size, Map meta, - Map data, AuthUser auth) + final long id, + final String name, + final String type, + final int ver, + final String user, + final long wsid, + final String wsname, + final String chksum, + final int size, + final Map meta, + final Map data, + final String token) throws Exception { us.kbase.workspace.GetObjectOutput goo = CLIENT1.getObject(new us.kbase.workspace.GetObjectParams() .withId(objnames.getName()).withWorkspace(objnames.getWorkspace()) @@ -1759,7 +1766,7 @@ private void checkSavedObjectDep(ObjectIdentity objnames, ObjectIdentity objids, goo = CLIENT1.getObject(new us.kbase.workspace.GetObjectParams() .withId(objnames.getName()).withWorkspace(objnames.getWorkspace()) .withInstance(objnames.getVer()) - .withAuth(auth.getTokenString())); + .withAuth(token)); checkDeprecatedSaveInfo(goo.getMetadata(), id, name, type, ver, user, wsid, wsname, chksum, meta); assertThat("object data is correct", goo.getData().asClassInstance(Object.class), @@ -1775,7 +1782,7 @@ private void checkSavedObjectDep(ObjectIdentity objnames, ObjectIdentity objids, CLIENT1.getObjectmeta(new us.kbase.workspace.GetObjectmetaParams() .withWorkspace(objnames.getWorkspace()) .withId(objnames.getName()).withInstance(objnames.getVer()) - .withAuth(AUTH_USER2.getTokenString())); + .withAuth(TOKEN2)); checkDeprecatedSaveInfo(objmeta, id, name, type, ver, user, wsid, wsname, chksum, meta); @@ -4680,7 +4687,7 @@ public void moduleOwnerShipAndSpecRegistration() throws Exception { fail("registered typespec to module with no perms"); } catch (ServerException ex) { assertThat("got correct exception message", ex.getMessage(), - is("User " + AUTH_USER1.getUserId() + " is not in list of owners of module TestModule2")); + is("User " + USER1 + " is not in list of owners of module TestModule2")); } CLIENT2.administer(new UObject(createData( @@ -4703,7 +4710,7 @@ public void moduleOwnerShipAndSpecRegistration() throws Exception { fail("registered typespec to module with no perms"); } catch (ServerException ex) { assertThat("got correct exception message", ex.getMessage(), - is("User " + AUTH_USER1.getUserId() + " is not in list of owners of module TestModule2")); + is("User " + USER1 + " is not in list of owners of module TestModule2")); } } diff --git a/src/us/kbase/workspace/test/kbase/JSONRPCLayerTester.java b/service/src/test/java/us/kbase/test/workspace/kbase/JSONRPCLayerTester.java similarity index 98% rename from src/us/kbase/workspace/test/kbase/JSONRPCLayerTester.java rename to service/src/test/java/us/kbase/test/workspace/kbase/JSONRPCLayerTester.java index c6c0ef844..b51b13831 100644 --- a/src/us/kbase/workspace/test/kbase/JSONRPCLayerTester.java +++ b/service/src/test/java/us/kbase/test/workspace/kbase/JSONRPCLayerTester.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.kbase; +package us.kbase.test.workspace.kbase; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.containsString; @@ -7,8 +7,8 @@ import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; -import static us.kbase.common.test.TestCommon.assertExceptionCorrect; -import static us.kbase.common.test.TestCommon.list; +import static us.kbase.test.common.TestCommon.assertExceptionCorrect; +import static us.kbase.test.common.TestCommon.list; import java.io.File; import java.io.IOException; @@ -38,18 +38,17 @@ import org.junit.Before; import org.junit.BeforeClass; -import us.kbase.auth.AuthConfig; import us.kbase.auth.AuthToken; -import us.kbase.auth.AuthUser; -import us.kbase.auth.ConfigurableAuthService; import us.kbase.common.service.JsonClientException; import us.kbase.common.service.ServerException; import us.kbase.common.service.Tuple11; import us.kbase.common.service.Tuple9; import us.kbase.common.service.UObject; -import us.kbase.common.test.TestCommon; -import us.kbase.common.test.controllers.mongo.MongoController; +import us.kbase.testutils.controllers.mongo.MongoController; import us.kbase.test.auth2.authcontroller.AuthController; +import us.kbase.test.common.TestCommon; +import us.kbase.test.workspace.JsonTokenStreamOCStat; +import us.kbase.test.workspace.WorkspaceServerThread; import us.kbase.typedobj.core.AbsoluteTypeDefId; import us.kbase.typedobj.core.TempFilesManager; import us.kbase.workspace.AlterWorkspaceMetadataParams; @@ -81,8 +80,6 @@ import us.kbase.workspace.database.UncheckedUserMetadata; import us.kbase.workspace.database.WorkspaceUser; import us.kbase.workspace.kbase.InitWorkspaceServer; -import us.kbase.workspace.test.JsonTokenStreamOCStat; -import us.kbase.workspace.test.WorkspaceServerThread; import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.databind.JsonMappingException; @@ -116,9 +113,10 @@ public class JSONRPCLayerTester { protected static final String USER1 = "user1"; protected static final String USER2 = "user2"; protected static final String USER3 = "user3"; + protected static String TOKEN1; + protected static String TOKEN2; + protected static String TOKEN3; protected static final String STARUSER = "*"; - protected static AuthUser AUTH_USER1 = null; - protected static AuthUser AUTH_USER2 = null; protected static WorkspaceServer SERVER2 = null; protected static WorkspaceClient CLIENT_FOR_SRV2 = null; // This client connects to SERVER2 protected static WorkspaceClient CLIENT_NO_AUTH = null; @@ -194,14 +192,14 @@ public static void setUpClass() throws Exception { final URL authURL = new URL("http://localhost:" + authc.getServerPort() + "/testmode"); System.out.println("started auth server at " + authURL); TestCommon.createAuthUser(authURL, USER1, "display1"); - final String token1 = TestCommon.createLoginToken(authURL, USER1); + TOKEN1 = TestCommon.createLoginToken(authURL, USER1); TestCommon.createAuthUser(authURL, USER2, "display2"); - final String token2 = TestCommon.createLoginToken(authURL, USER2); + TOKEN2 = TestCommon.createLoginToken(authURL, USER2); TestCommon.createAuthUser(authURL, USER3, "display3"); - final String token3 = TestCommon.createLoginToken(authURL, USER3); - final AuthToken t1 = new AuthToken(token1, USER1); - final AuthToken t2 = new AuthToken(token2, USER2); - final AuthToken t3 = new AuthToken(token3, USER3); + TOKEN3 = TestCommon.createLoginToken(authURL, USER3); + final AuthToken t1 = new AuthToken(TOKEN1, USER1); + final AuthToken t2 = new AuthToken(TOKEN2, USER2); + final AuthToken t3 = new AuthToken(TOKEN3, USER3); TestCommon.createCustomRole(authURL, AUTH_ROLE_READ1, "read 1"); TestCommon.createCustomRole(authURL, AUTH_ROLE_READ2, "read 2"); TestCommon.createCustomRole(authURL, AUTH_ROLE_FULL, "full"); @@ -221,12 +219,6 @@ public static void setUpClass() throws Exception { CLIENT3.setIsInsecureHttpConnectionAllowed(true); CLIENT_NO_AUTH = new WorkspaceClient(wsurl); CLIENT_NO_AUTH.setIsInsecureHttpConnectionAllowed(true); - final ConfigurableAuthService auth = new ConfigurableAuthService( - new AuthConfig().withKBaseAuthServerURL(new URL("http://localhost:" + - authc.getServerPort() + "/testmode/api/legacy/KBase")) - .withAllowInsecureURLs(true)); - AUTH_USER1 = auth.getUserFromToken(t1); - AUTH_USER2 = auth.getUserFromToken(t2); SERVER_AUTH_ADMINS = startupWorkspaceServer( mongohost, DB_WS_NAME_AUTH2_ADMINS, DB_TYPE_NAME_AUTH2_ADMINS, true); diff --git a/src/us/kbase/workspace/test/kbase/KBaseWorkspaceConfigTest.java b/service/src/test/java/us/kbase/test/workspace/kbase/KBaseWorkspaceConfigTest.java similarity index 99% rename from src/us/kbase/workspace/test/kbase/KBaseWorkspaceConfigTest.java rename to service/src/test/java/us/kbase/test/workspace/kbase/KBaseWorkspaceConfigTest.java index 6fc16640c..e90c10b3d 100644 --- a/src/us/kbase/workspace/test/kbase/KBaseWorkspaceConfigTest.java +++ b/service/src/test/java/us/kbase/test/workspace/kbase/KBaseWorkspaceConfigTest.java @@ -1,10 +1,10 @@ -package us.kbase.workspace.test.kbase; +package us.kbase.test.workspace.kbase; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; import static org.junit.Assert.fail; -import static us.kbase.common.test.TestCommon.set; -import static us.kbase.common.test.controllers.ControllerCommon.makeTempDirs; +import static us.kbase.test.common.TestCommon.set; +import static us.kbase.testutils.controllers.ControllerCommon.makeTempDirs; import java.io.BufferedWriter; import java.io.IOException; @@ -30,8 +30,8 @@ import nl.jqno.equalsverifier.EqualsVerifier; import software.amazon.awssdk.regions.Region; -import us.kbase.common.test.MapBuilder; -import us.kbase.common.test.TestCommon; +import us.kbase.test.common.MapBuilder; +import us.kbase.test.common.TestCommon; import us.kbase.workspace.kbase.BackendType; import us.kbase.workspace.kbase.KBaseWorkspaceConfig; import us.kbase.workspace.kbase.KBaseWorkspaceConfig.KBaseWorkspaceConfigException; diff --git a/src/us/kbase/workspace/test/kbase/LoggingTest.java b/service/src/test/java/us/kbase/test/workspace/kbase/LoggingTest.java similarity index 99% rename from src/us/kbase/workspace/test/kbase/LoggingTest.java rename to service/src/test/java/us/kbase/test/workspace/kbase/LoggingTest.java index fe5bbaa39..9fbfbd42e 100644 --- a/src/us/kbase/workspace/test/kbase/LoggingTest.java +++ b/service/src/test/java/us/kbase/test/workspace/kbase/LoggingTest.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.kbase; +package us.kbase.test.workspace.kbase; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; @@ -31,9 +31,10 @@ import us.kbase.common.service.UObject; import us.kbase.common.service.JsonServerSyslog.SyslogOutput; import us.kbase.common.service.Tuple11; -import us.kbase.common.test.TestCommon; -import us.kbase.common.test.controllers.mongo.MongoController; +import us.kbase.testutils.controllers.mongo.MongoController; import us.kbase.test.auth2.authcontroller.AuthController; +import us.kbase.test.common.TestCommon; +import us.kbase.test.workspace.WorkspaceServerThread; import us.kbase.workspace.AlterAdminObjectMetadataParams; import us.kbase.workspace.CopyObjectParams; import us.kbase.workspace.CreateWorkspaceParams; @@ -50,12 +51,12 @@ import us.kbase.workspace.WorkspaceClient; import us.kbase.workspace.WorkspaceServer; import us.kbase.workspace.database.DynamicConfig; -import us.kbase.workspace.test.WorkspaceServerThread; import com.mongodb.client.MongoClient; import com.mongodb.client.MongoClients; import com.mongodb.client.MongoDatabase; + /** Tests application logging only - not the standard logging that comes with * JsonServerServlet. * @author gaprice@lbl.gov diff --git a/src/us/kbase/workspace/test/kbase/SampleIDHandlerFactoryTest.java b/service/src/test/java/us/kbase/test/workspace/kbase/SampleIDHandlerFactoryTest.java similarity index 99% rename from src/us/kbase/workspace/test/kbase/SampleIDHandlerFactoryTest.java rename to service/src/test/java/us/kbase/test/workspace/kbase/SampleIDHandlerFactoryTest.java index 34da13d6b..0f7533798 100644 --- a/src/us/kbase/workspace/test/kbase/SampleIDHandlerFactoryTest.java +++ b/service/src/test/java/us/kbase/test/workspace/kbase/SampleIDHandlerFactoryTest.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.kbase; +package us.kbase.test.workspace.kbase; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; @@ -25,11 +25,11 @@ import us.kbase.common.service.JsonClientException; import us.kbase.common.service.ServerException; import us.kbase.common.service.UnauthorizedException; -import us.kbase.common.test.TestCommon; import us.kbase.sampleservice.GetSampleACLsParams; import us.kbase.sampleservice.SampleACLs; import us.kbase.sampleservice.SampleServiceClient; import us.kbase.sampleservice.UpdateSamplesACLsParams; +import us.kbase.test.common.TestCommon; import us.kbase.typedobj.idref.IdReferenceType; import us.kbase.typedobj.idref.SimpleRemappedId; import us.kbase.typedobj.idref.IdReferenceHandlerSet.IdReferenceException; diff --git a/src/us/kbase/workspace/test/kbase/SampleServiceIntegrationTest.java b/service/src/test/java/us/kbase/test/workspace/kbase/SampleServiceIntegrationTest.java similarity index 97% rename from src/us/kbase/workspace/test/kbase/SampleServiceIntegrationTest.java rename to service/src/test/java/us/kbase/test/workspace/kbase/SampleServiceIntegrationTest.java index aa3f27eaa..beafbb75c 100644 --- a/src/us/kbase/workspace/test/kbase/SampleServiceIntegrationTest.java +++ b/service/src/test/java/us/kbase/test/workspace/kbase/SampleServiceIntegrationTest.java @@ -1,10 +1,11 @@ -package us.kbase.workspace.test.kbase; +package us.kbase.test.workspace.kbase; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; import static org.junit.Assert.fail; -import static us.kbase.common.test.controllers.ControllerCommon.findFreePort; -import static us.kbase.workspace.test.kbase.JSONRPCLayerTester.administerCommand; +import static us.kbase.testutils.controllers.ControllerCommon.findFreePort; +import static us.kbase.test.common.TestCommon.set; +import static us.kbase.test.workspace.kbase.JSONRPCLayerTester.administerCommand; import java.io.File; import java.io.IOException; @@ -13,7 +14,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; -import java.util.HashSet; import java.util.List; import java.util.Map; @@ -39,9 +39,8 @@ import us.kbase.common.service.JsonClientException; import us.kbase.common.service.ServerException; import us.kbase.common.service.UObject; -import us.kbase.common.test.TestCommon; -import us.kbase.common.test.TestException; -import us.kbase.common.test.controllers.mongo.MongoController; +import us.kbase.testutils.TestException; +import us.kbase.testutils.controllers.mongo.MongoController; import us.kbase.sampleservice.CreateSampleParams; import us.kbase.sampleservice.GetSampleACLsParams; import us.kbase.sampleservice.Sample; @@ -51,6 +50,10 @@ import us.kbase.sampleservice.SampleServiceClient; import us.kbase.sampleservice.UpdateSampleACLsParams; import us.kbase.test.auth2.authcontroller.AuthController; +import us.kbase.test.common.TestCommon; +import us.kbase.test.workspace.WorkspaceServerThread; +import us.kbase.test.workspace.controllers.arango.ArangoController; +import us.kbase.test.workspace.controllers.sample.SampleServiceController; import us.kbase.workspace.CreateWorkspaceParams; import us.kbase.workspace.GetObjects2Params; import us.kbase.workspace.ObjectData; @@ -63,9 +66,6 @@ import us.kbase.workspace.WorkspaceClient; import us.kbase.workspace.WorkspaceServer; import us.kbase.workspace.database.DynamicConfig; -import us.kbase.workspace.test.WorkspaceServerThread; -import us.kbase.workspace.test.controllers.arango.ArangoController; -import us.kbase.workspace.test.controllers.sample.SampleServiceController; public class SampleServiceIntegrationTest { @@ -338,11 +338,9 @@ public void status() throws Exception { // only test the parts of the status that are relevant for the sample service final Map status = CLIENT1.status(); -// System.out.println(status); - - assertThat("incorrect status keys", status.keySet(), is(new HashSet<>(Arrays.asList( - "state", "message", "dependencies", "version", "git_url", "freemem", "totalmem", - "maxmem")))); + assertThat("incorrect status keys", status.keySet(), is(set( + "state", "message", "dependencies", "version", "git_url", "git_commit", + "freemem", "totalmem", "maxmem"))); assertThat("incorrect state", status.get("state"), is("OK")); diff --git a/src/us/kbase/workspace/test/kbase/SchemaUpdaterCLITest.java b/service/src/test/java/us/kbase/test/workspace/kbase/SchemaUpdaterCLITest.java similarity index 97% rename from src/us/kbase/workspace/test/kbase/SchemaUpdaterCLITest.java rename to service/src/test/java/us/kbase/test/workspace/kbase/SchemaUpdaterCLITest.java index e84f67df5..cc8338009 100644 --- a/src/us/kbase/workspace/test/kbase/SchemaUpdaterCLITest.java +++ b/service/src/test/java/us/kbase/test/workspace/kbase/SchemaUpdaterCLITest.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.kbase; +package us.kbase.test.workspace.kbase; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.containsString; @@ -7,7 +7,7 @@ import static org.mockito.Mockito.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -import static us.kbase.common.test.controllers.ControllerCommon.makeTempDirs; +import static us.kbase.testutils.controllers.ControllerCommon.makeTempDirs; import java.io.ByteArrayOutputStream; import java.nio.file.Path; @@ -30,8 +30,8 @@ import com.mongodb.client.MongoClient; import com.mongodb.client.MongoDatabase; -import us.kbase.common.test.MapBuilder; -import us.kbase.common.test.TestCommon; +import us.kbase.test.common.MapBuilder; +import us.kbase.test.common.TestCommon; import us.kbase.workspace.database.mongo.SchemaUpdater; import us.kbase.workspace.database.mongo.SchemaUpdater.SchemaUpdateException; import us.kbase.workspace.kbase.KBaseWorkspaceConfig; @@ -41,7 +41,7 @@ public class SchemaUpdaterCLITest { - private static final String VERSION = "0.14.3"; + private static final String VERSION = "0.15.0"; private static final List HELP = list( "Usage: update_workspace_database_schema [-chosV] ", diff --git a/src/us/kbase/workspace/test/kbase/TypeClientTest.java b/service/src/test/java/us/kbase/test/workspace/kbase/TypeClientTest.java similarity index 99% rename from src/us/kbase/workspace/test/kbase/TypeClientTest.java rename to service/src/test/java/us/kbase/test/workspace/kbase/TypeClientTest.java index 6d4b2ae91..338bfbee0 100644 --- a/src/us/kbase/workspace/test/kbase/TypeClientTest.java +++ b/service/src/test/java/us/kbase/test/workspace/kbase/TypeClientTest.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.kbase; +package us.kbase.test.workspace.kbase; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; @@ -8,7 +8,7 @@ import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import static us.kbase.common.test.TestCommon.list; +import static us.kbase.test.common.TestCommon.list; import java.io.IOException; import java.net.URL; @@ -24,7 +24,7 @@ import us.kbase.common.service.ServerException; import us.kbase.common.service.UObject; import us.kbase.common.service.UnauthorizedException; -import us.kbase.common.test.TestCommon; +import us.kbase.test.common.TestCommon; import us.kbase.workspace.GetModuleInfoParams; import us.kbase.workspace.GrantModuleOwnershipParams; import us.kbase.workspace.ListAllTypesParams; diff --git a/src/us/kbase/workspace/test/kbase/TypeDelegationTest.java b/service/src/test/java/us/kbase/test/workspace/kbase/TypeDelegationTest.java similarity index 99% rename from src/us/kbase/workspace/test/kbase/TypeDelegationTest.java rename to service/src/test/java/us/kbase/test/workspace/kbase/TypeDelegationTest.java index 4f38b53ec..cf27740eb 100644 --- a/src/us/kbase/workspace/test/kbase/TypeDelegationTest.java +++ b/service/src/test/java/us/kbase/test/workspace/kbase/TypeDelegationTest.java @@ -1,12 +1,12 @@ -package us.kbase.workspace.test.kbase; +package us.kbase.test.workspace.kbase; import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.nullValue; import static org.junit.Assert.assertThat; import static org.junit.Assert.fail; -import static us.kbase.common.test.TestCommon.list; -import static us.kbase.workspace.test.kbase.JSONRPCLayerTester.startupWorkspaceServer; +import static us.kbase.test.common.TestCommon.list; +import static us.kbase.test.workspace.kbase.JSONRPCLayerTester.startupWorkspaceServer; import java.net.URL; import java.nio.file.Paths; @@ -30,10 +30,10 @@ import us.kbase.auth.AuthToken; import us.kbase.common.service.ServerException; import us.kbase.common.service.UObject; -import us.kbase.common.test.MapBuilder; -import us.kbase.common.test.TestCommon; -import us.kbase.common.test.controllers.mongo.MongoController; +import us.kbase.testutils.controllers.mongo.MongoController; import us.kbase.test.auth2.authcontroller.AuthController; +import us.kbase.test.common.MapBuilder; +import us.kbase.test.common.TestCommon; import us.kbase.typedobj.db.TypeDefinitionDB; import us.kbase.workspace.CreateWorkspaceParams; import us.kbase.workspace.GetModuleInfoParams; diff --git a/src/us/kbase/workspace/test/kbase/WorkspaceServerMethodsTest.java b/service/src/test/java/us/kbase/test/workspace/kbase/WorkspaceServerMethodsTest.java similarity index 98% rename from src/us/kbase/workspace/test/kbase/WorkspaceServerMethodsTest.java rename to service/src/test/java/us/kbase/test/workspace/kbase/WorkspaceServerMethodsTest.java index 7d1ada250..7c6297a25 100644 --- a/src/us/kbase/workspace/test/kbase/WorkspaceServerMethodsTest.java +++ b/service/src/test/java/us/kbase/test/workspace/kbase/WorkspaceServerMethodsTest.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.kbase; +package us.kbase.test.workspace.kbase; import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; @@ -20,8 +20,8 @@ import ch.qos.logback.classic.Level; import ch.qos.logback.classic.spi.ILoggingEvent; -import us.kbase.common.test.TestCommon; -import us.kbase.common.test.TestCommon.LogEvent; +import us.kbase.test.common.TestCommon; +import us.kbase.test.common.TestCommon.LogEvent; import us.kbase.workspace.AlterAdminObjectMetadataParams; import us.kbase.workspace.ObjectIdentity; import us.kbase.workspace.ObjectMetadataUpdate; diff --git a/src/us/kbase/workspace/test/kbase/admin/AdministrationCommandSetInstallerTest.java b/service/src/test/java/us/kbase/test/workspace/kbase/admin/AdministrationCommandSetInstallerTest.java similarity index 99% rename from src/us/kbase/workspace/test/kbase/admin/AdministrationCommandSetInstallerTest.java rename to service/src/test/java/us/kbase/test/workspace/kbase/admin/AdministrationCommandSetInstallerTest.java index 7801be18b..5f4e6bb55 100644 --- a/src/us/kbase/workspace/test/kbase/admin/AdministrationCommandSetInstallerTest.java +++ b/service/src/test/java/us/kbase/test/workspace/kbase/admin/AdministrationCommandSetInstallerTest.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.kbase.admin; +package us.kbase.test.workspace.kbase.admin; import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.CoreMatchers.is; @@ -11,10 +11,10 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import static us.kbase.common.test.TestCommon.assertLogEventsCorrect; -import static us.kbase.common.test.TestCommon.inst; -import static us.kbase.common.test.TestCommon.list; -import static us.kbase.common.test.TestCommon.set; +import static us.kbase.test.common.TestCommon.assertLogEventsCorrect; +import static us.kbase.test.common.TestCommon.inst; +import static us.kbase.test.common.TestCommon.list; +import static us.kbase.test.common.TestCommon.set; import java.net.URL; import java.util.Arrays; @@ -41,9 +41,9 @@ import us.kbase.common.service.Tuple11; import us.kbase.common.service.Tuple9; import us.kbase.common.service.UObject; -import us.kbase.common.test.MapBuilder; -import us.kbase.common.test.TestCommon; -import us.kbase.common.test.TestCommon.LogEvent; +import us.kbase.test.common.MapBuilder; +import us.kbase.test.common.TestCommon; +import us.kbase.test.common.TestCommon.LogEvent; import us.kbase.typedobj.db.OwnerInfo; import us.kbase.workspace.CreateWorkspaceParams; import us.kbase.workspace.GetObjectInfo3Params; diff --git a/src/us/kbase/workspace/test/kbase/admin/DefaultAdminHandlerTest.java b/service/src/test/java/us/kbase/test/workspace/kbase/admin/DefaultAdminHandlerTest.java similarity index 97% rename from src/us/kbase/workspace/test/kbase/admin/DefaultAdminHandlerTest.java rename to service/src/test/java/us/kbase/test/workspace/kbase/admin/DefaultAdminHandlerTest.java index 22eda9805..e62d6fcc3 100644 --- a/src/us/kbase/workspace/test/kbase/admin/DefaultAdminHandlerTest.java +++ b/service/src/test/java/us/kbase/test/workspace/kbase/admin/DefaultAdminHandlerTest.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.kbase.admin; +package us.kbase.test.workspace.kbase.admin; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; @@ -7,12 +7,12 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import static us.kbase.common.test.TestCommon.set; +import static us.kbase.test.common.TestCommon.set; import org.junit.Test; import us.kbase.auth.AuthToken; -import us.kbase.common.test.TestCommon; +import us.kbase.test.common.TestCommon; import us.kbase.workspace.database.Workspace; import us.kbase.workspace.database.WorkspaceUser; import us.kbase.workspace.database.exceptions.WorkspaceCommunicationException; diff --git a/src/us/kbase/workspace/test/kbase/admin/KBaseAuth2AdminHandlerTest.java b/service/src/test/java/us/kbase/test/workspace/kbase/admin/KBaseAuth2AdminHandlerTest.java similarity index 99% rename from src/us/kbase/workspace/test/kbase/admin/KBaseAuth2AdminHandlerTest.java rename to service/src/test/java/us/kbase/test/workspace/kbase/admin/KBaseAuth2AdminHandlerTest.java index 56a74180e..15adf44fd 100644 --- a/src/us/kbase/workspace/test/kbase/admin/KBaseAuth2AdminHandlerTest.java +++ b/service/src/test/java/us/kbase/test/workspace/kbase/admin/KBaseAuth2AdminHandlerTest.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.kbase.admin; +package us.kbase.test.workspace.kbase.admin; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.containsString; @@ -10,7 +10,7 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import static us.kbase.common.test.TestCommon.set; +import static us.kbase.test.common.TestCommon.set; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -38,7 +38,7 @@ import com.google.common.collect.ImmutableMap; import us.kbase.auth.AuthToken; -import us.kbase.common.test.TestCommon; +import us.kbase.test.common.TestCommon; import us.kbase.workspace.database.WorkspaceUser; import us.kbase.workspace.kbase.admin.AdminRole; import us.kbase.workspace.kbase.admin.AdministratorHandlerException; diff --git a/src/us/kbase/workspace/test/kbase/admin/WorkspaceAdministrationTest.java b/service/src/test/java/us/kbase/test/workspace/kbase/admin/WorkspaceAdministrationTest.java similarity index 99% rename from src/us/kbase/workspace/test/kbase/admin/WorkspaceAdministrationTest.java rename to service/src/test/java/us/kbase/test/workspace/kbase/admin/WorkspaceAdministrationTest.java index c6422a046..060376539 100644 --- a/src/us/kbase/workspace/test/kbase/admin/WorkspaceAdministrationTest.java +++ b/service/src/test/java/us/kbase/test/workspace/kbase/admin/WorkspaceAdministrationTest.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.kbase.admin; +package us.kbase.test.workspace.kbase.admin; import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.CoreMatchers.is; @@ -12,8 +12,8 @@ import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import static us.kbase.common.test.TestCommon.assertLogEventsCorrect; -import static us.kbase.common.test.TestCommon.set; +import static us.kbase.test.common.TestCommon.assertLogEventsCorrect; +import static us.kbase.test.common.TestCommon.set; import java.io.IOException; import java.util.Arrays; @@ -36,8 +36,8 @@ import us.kbase.auth.AuthToken; import us.kbase.common.service.JsonTokenStream; import us.kbase.common.service.UObject; -import us.kbase.common.test.TestCommon; -import us.kbase.common.test.TestCommon.LogEvent; +import us.kbase.test.common.TestCommon; +import us.kbase.test.common.TestCommon.LogEvent; import us.kbase.workspace.database.WorkspaceObjectData; import us.kbase.workspace.database.WorkspaceUser; import us.kbase.workspace.kbase.admin.AdminCommand; diff --git a/src/us/kbase/workspace/test/listener/BadListenerFactory.java b/service/src/test/java/us/kbase/test/workspace/listener/BadListenerFactory.java similarity index 98% rename from src/us/kbase/workspace/test/listener/BadListenerFactory.java rename to service/src/test/java/us/kbase/test/workspace/listener/BadListenerFactory.java index 6f70746d4..91d2d8f1d 100644 --- a/src/us/kbase/workspace/test/listener/BadListenerFactory.java +++ b/service/src/test/java/us/kbase/test/workspace/listener/BadListenerFactory.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.listener; +package us.kbase.test.workspace.listener; import java.time.Instant; import java.util.List; diff --git a/src/us/kbase/workspace/test/listener/NullListenerFactory.java b/service/src/test/java/us/kbase/test/workspace/listener/NullListenerFactory.java similarity index 99% rename from src/us/kbase/workspace/test/listener/NullListenerFactory.java rename to service/src/test/java/us/kbase/test/workspace/listener/NullListenerFactory.java index 1a1ee5f7a..9da5f029d 100644 --- a/src/us/kbase/workspace/test/listener/NullListenerFactory.java +++ b/service/src/test/java/us/kbase/test/workspace/listener/NullListenerFactory.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.listener; +package us.kbase.test.workspace.listener; import java.time.Instant; import java.util.List; diff --git a/src/us/kbase/workspace/test/modules/KafkaNotifierFactoryTest.java b/service/src/test/java/us/kbase/test/workspace/modules/KafkaNotifierFactoryTest.java similarity index 99% rename from src/us/kbase/workspace/test/modules/KafkaNotifierFactoryTest.java rename to service/src/test/java/us/kbase/test/workspace/modules/KafkaNotifierFactoryTest.java index bd6dec46e..412807d95 100644 --- a/src/us/kbase/workspace/test/modules/KafkaNotifierFactoryTest.java +++ b/service/src/test/java/us/kbase/test/workspace/modules/KafkaNotifierFactoryTest.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.modules; +package us.kbase.test.workspace.modules; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; @@ -6,7 +6,7 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import static us.kbase.common.test.TestCommon.inst; +import static us.kbase.test.common.TestCommon.inst; import java.io.ByteArrayOutputStream; import java.lang.reflect.Constructor; @@ -30,8 +30,8 @@ import com.google.common.collect.ImmutableMap; -import us.kbase.common.test.MapBuilder; -import us.kbase.common.test.TestCommon; +import us.kbase.test.common.MapBuilder; +import us.kbase.test.common.TestCommon; import us.kbase.typedobj.core.AbsoluteTypeDefId; import us.kbase.typedobj.core.TypeDefName; import us.kbase.workspace.database.ObjectInformation; diff --git a/src/us/kbase/workspace/test/workspace/ByteArrayFileCacheManagerTest.java b/service/src/test/java/us/kbase/test/workspace/workspace/ByteArrayFileCacheManagerTest.java similarity index 99% rename from src/us/kbase/workspace/test/workspace/ByteArrayFileCacheManagerTest.java rename to service/src/test/java/us/kbase/test/workspace/workspace/ByteArrayFileCacheManagerTest.java index 277b9aac2..788656b96 100644 --- a/src/us/kbase/workspace/test/workspace/ByteArrayFileCacheManagerTest.java +++ b/service/src/test/java/us/kbase/test/workspace/workspace/ByteArrayFileCacheManagerTest.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.workspace; +package us.kbase.test.workspace.workspace; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; @@ -7,7 +7,7 @@ import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -import static us.kbase.common.test.TestCommon.list; +import static us.kbase.test.common.TestCommon.list; import java.io.ByteArrayInputStream; import java.io.File; @@ -24,7 +24,7 @@ import com.google.common.collect.ImmutableMap; -import us.kbase.common.test.TestCommon; +import us.kbase.test.common.TestCommon; import us.kbase.typedobj.core.SubsetSelection; import us.kbase.typedobj.core.TempFileListener; import us.kbase.typedobj.core.TempFilesManager; diff --git a/src/us/kbase/workspace/test/workspace/DynamicConfigTest.java b/service/src/test/java/us/kbase/test/workspace/workspace/DynamicConfigTest.java similarity index 98% rename from src/us/kbase/workspace/test/workspace/DynamicConfigTest.java rename to service/src/test/java/us/kbase/test/workspace/workspace/DynamicConfigTest.java index 68a796d90..a103ce0f9 100644 --- a/src/us/kbase/workspace/test/workspace/DynamicConfigTest.java +++ b/service/src/test/java/us/kbase/test/workspace/workspace/DynamicConfigTest.java @@ -1,10 +1,10 @@ -package us.kbase.workspace.test.workspace; +package us.kbase.test.workspace.workspace; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; import static org.junit.Assert.fail; -import static us.kbase.common.test.TestCommon.opt; -import static us.kbase.common.test.TestCommon.EI; +import static us.kbase.test.common.TestCommon.EI; +import static us.kbase.test.common.TestCommon.opt; import java.util.Collections; import java.util.Map; @@ -14,7 +14,7 @@ import com.google.common.collect.ImmutableMap; import nl.jqno.equalsverifier.EqualsVerifier; -import us.kbase.common.test.TestCommon; +import us.kbase.test.common.TestCommon; import us.kbase.workspace.database.DynamicConfig; import us.kbase.workspace.database.DynamicConfig.DynamicConfigUpdate; diff --git a/src/us/kbase/workspace/test/workspace/ErrorOrTest.java b/service/src/test/java/us/kbase/test/workspace/workspace/ErrorOrTest.java similarity index 96% rename from src/us/kbase/workspace/test/workspace/ErrorOrTest.java rename to service/src/test/java/us/kbase/test/workspace/workspace/ErrorOrTest.java index f6c426ee6..334faa9ac 100644 --- a/src/us/kbase/workspace/test/workspace/ErrorOrTest.java +++ b/service/src/test/java/us/kbase/test/workspace/workspace/ErrorOrTest.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.workspace; +package us.kbase.test.workspace.workspace; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.nullValue; @@ -10,7 +10,7 @@ import org.junit.Test; import nl.jqno.equalsverifier.EqualsVerifier; -import us.kbase.common.test.TestCommon; +import us.kbase.test.common.TestCommon; import us.kbase.workspace.database.exceptions.ErrorOr; import us.kbase.workspace.database.exceptions.ErrorType; diff --git a/src/us/kbase/workspace/test/workspace/ListObjectParametersTest.java b/service/src/test/java/us/kbase/test/workspace/workspace/ListObjectParametersTest.java similarity index 99% rename from src/us/kbase/workspace/test/workspace/ListObjectParametersTest.java rename to service/src/test/java/us/kbase/test/workspace/workspace/ListObjectParametersTest.java index 0b1ea4b1a..a946f4530 100644 --- a/src/us/kbase/workspace/test/workspace/ListObjectParametersTest.java +++ b/service/src/test/java/us/kbase/test/workspace/workspace/ListObjectParametersTest.java @@ -1,9 +1,9 @@ -package us.kbase.workspace.test.workspace; +package us.kbase.test.workspace.workspace; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; import static org.junit.Assert.fail; -import static us.kbase.common.test.TestCommon.assertExceptionCorrect; +import static us.kbase.test.common.TestCommon.assertExceptionCorrect; import java.time.Instant; import java.util.ArrayList; @@ -21,7 +21,7 @@ import com.google.common.collect.ImmutableMap; -import us.kbase.common.test.MapBuilder; +import us.kbase.test.common.MapBuilder; import us.kbase.typedobj.core.TypeDefId; import us.kbase.workspace.database.AllUsers; import us.kbase.workspace.database.ListObjectsParameters; diff --git a/src/us/kbase/workspace/test/workspace/MetadataUpdateTest.java b/service/src/test/java/us/kbase/test/workspace/workspace/MetadataUpdateTest.java similarity index 94% rename from src/us/kbase/workspace/test/workspace/MetadataUpdateTest.java rename to service/src/test/java/us/kbase/test/workspace/workspace/MetadataUpdateTest.java index 7d2301d96..b684c3195 100644 --- a/src/us/kbase/workspace/test/workspace/MetadataUpdateTest.java +++ b/service/src/test/java/us/kbase/test/workspace/workspace/MetadataUpdateTest.java @@ -1,10 +1,10 @@ -package us.kbase.workspace.test.workspace; +package us.kbase.test.workspace.workspace; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; import static org.junit.Assert.fail; -import static us.kbase.common.test.TestCommon.assertExceptionCorrect; -import static us.kbase.common.test.TestCommon.set; +import static us.kbase.test.common.TestCommon.assertExceptionCorrect; +import static us.kbase.test.common.TestCommon.set; import java.util.Arrays; import java.util.Optional; diff --git a/src/us/kbase/workspace/test/workspace/ObjectIDNoWSNoVerTest.java b/service/src/test/java/us/kbase/test/workspace/workspace/ObjectIDNoWSNoVerTest.java similarity index 98% rename from src/us/kbase/workspace/test/workspace/ObjectIDNoWSNoVerTest.java rename to service/src/test/java/us/kbase/test/workspace/workspace/ObjectIDNoWSNoVerTest.java index dc584a040..1aa769a7d 100644 --- a/src/us/kbase/workspace/test/workspace/ObjectIDNoWSNoVerTest.java +++ b/service/src/test/java/us/kbase/test/workspace/workspace/ObjectIDNoWSNoVerTest.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.workspace; +package us.kbase.test.workspace.workspace; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; @@ -9,7 +9,7 @@ import com.google.common.base.Optional; import nl.jqno.equalsverifier.EqualsVerifier; -import us.kbase.common.test.TestCommon; +import us.kbase.test.common.TestCommon; import us.kbase.workspace.database.ObjectIDNoWSNoVer; public class ObjectIDNoWSNoVerTest { diff --git a/src/us/kbase/workspace/test/workspace/ObjectIdentifierTest.java b/service/src/test/java/us/kbase/test/workspace/workspace/ObjectIdentifierTest.java similarity index 98% rename from src/us/kbase/workspace/test/workspace/ObjectIdentifierTest.java rename to service/src/test/java/us/kbase/test/workspace/workspace/ObjectIdentifierTest.java index c23fbd3f9..9b18bca6c 100644 --- a/src/us/kbase/workspace/test/workspace/ObjectIdentifierTest.java +++ b/service/src/test/java/us/kbase/test/workspace/workspace/ObjectIdentifierTest.java @@ -1,15 +1,15 @@ -package us.kbase.workspace.test.workspace; +package us.kbase.test.workspace.workspace; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; import static org.junit.Assert.fail; -import static us.kbase.workspace.test.LongTextForTestUsage.TEXT255; -import static us.kbase.workspace.test.LongTextForTestUsage.TEXT256; -import static us.kbase.common.test.TestCommon.list; -import static us.kbase.common.test.TestCommon.ES; -import static us.kbase.common.test.TestCommon.EL; -import static us.kbase.common.test.TestCommon.EI; -import static us.kbase.common.test.TestCommon.opt; +import static us.kbase.test.common.TestCommon.EI; +import static us.kbase.test.common.TestCommon.EL; +import static us.kbase.test.common.TestCommon.ES; +import static us.kbase.test.common.TestCommon.list; +import static us.kbase.test.common.TestCommon.opt; +import static us.kbase.test.workspace.LongTextForTestUsage.TEXT255; +import static us.kbase.test.workspace.LongTextForTestUsage.TEXT256; import java.util.ArrayList; import java.util.Arrays; @@ -21,8 +21,8 @@ import org.junit.Test; import nl.jqno.equalsverifier.EqualsVerifier; -import us.kbase.common.test.MapBuilder; -import us.kbase.common.test.TestCommon; +import us.kbase.test.common.MapBuilder; +import us.kbase.test.common.TestCommon; import us.kbase.typedobj.core.SubsetSelection; import us.kbase.workspace.database.ObjectIdentifier; import us.kbase.workspace.database.WorkspaceIdentifier; diff --git a/src/us/kbase/workspace/test/workspace/ObjectInformationTest.java b/service/src/test/java/us/kbase/test/workspace/workspace/ObjectInformationTest.java similarity index 99% rename from src/us/kbase/workspace/test/workspace/ObjectInformationTest.java rename to service/src/test/java/us/kbase/test/workspace/workspace/ObjectInformationTest.java index 8b9c37787..9680642d3 100644 --- a/src/us/kbase/workspace/test/workspace/ObjectInformationTest.java +++ b/service/src/test/java/us/kbase/test/workspace/workspace/ObjectInformationTest.java @@ -1,11 +1,11 @@ -package us.kbase.workspace.test.workspace; +package us.kbase.test.workspace.workspace; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.nullValue; import static org.junit.Assert.assertThat; import static org.junit.Assert.fail; -import static us.kbase.common.test.TestCommon.inst; -import static us.kbase.common.test.TestCommon.assertExceptionCorrect; +import static us.kbase.test.common.TestCommon.assertExceptionCorrect; +import static us.kbase.test.common.TestCommon.inst; import java.time.Instant; import java.util.Arrays; @@ -22,7 +22,7 @@ import com.google.common.collect.ImmutableMap; import nl.jqno.equalsverifier.EqualsVerifier; -import us.kbase.common.test.TestCommon; +import us.kbase.test.common.TestCommon; import us.kbase.typedobj.core.AbsoluteTypeDefId; import us.kbase.typedobj.core.MD5; import us.kbase.typedobj.core.TypeDefName; diff --git a/src/us/kbase/workspace/test/workspace/ObjectResolverTest.java b/service/src/test/java/us/kbase/test/workspace/workspace/ObjectResolverTest.java similarity index 99% rename from src/us/kbase/workspace/test/workspace/ObjectResolverTest.java rename to service/src/test/java/us/kbase/test/workspace/workspace/ObjectResolverTest.java index 37748f8cc..03b96ed26 100644 --- a/src/us/kbase/workspace/test/workspace/ObjectResolverTest.java +++ b/service/src/test/java/us/kbase/test/workspace/workspace/ObjectResolverTest.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.workspace; +package us.kbase.test.workspace.workspace; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; @@ -6,7 +6,7 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.mockingDetails; import static org.mockito.Mockito.when; -import static us.kbase.common.test.TestCommon.set; +import static us.kbase.test.common.TestCommon.set; import java.util.Arrays; import java.util.Collections; @@ -17,8 +17,8 @@ import com.google.common.collect.ImmutableMap; -import us.kbase.common.test.TestCommon; -import us.kbase.common.test.TestException; +import us.kbase.test.common.TestCommon; +import us.kbase.testutils.TestException; import us.kbase.workspace.database.AllUsers; import us.kbase.workspace.database.ObjectIDResolvedWS; import us.kbase.workspace.database.ObjectIdentifier; diff --git a/src/us/kbase/workspace/test/workspace/PermissionSetTest.java b/service/src/test/java/us/kbase/test/workspace/workspace/PermissionSetTest.java similarity index 98% rename from src/us/kbase/workspace/test/workspace/PermissionSetTest.java rename to service/src/test/java/us/kbase/test/workspace/workspace/PermissionSetTest.java index ff58fb51a..e31e35246 100644 --- a/src/us/kbase/workspace/test/workspace/PermissionSetTest.java +++ b/service/src/test/java/us/kbase/test/workspace/workspace/PermissionSetTest.java @@ -1,11 +1,10 @@ -package us.kbase.workspace.test.workspace; +package us.kbase.test.workspace.workspace; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.nullValue; import static org.junit.Assert.assertThat; import static org.junit.Assert.fail; - -import static us.kbase.common.test.TestCommon.set; +import static us.kbase.test.common.TestCommon.set; import java.util.Arrays; import java.util.List; @@ -13,7 +12,7 @@ import org.junit.Test; import nl.jqno.equalsverifier.EqualsVerifier; -import us.kbase.common.test.TestCommon; +import us.kbase.test.common.TestCommon; import us.kbase.workspace.database.AllUsers; import us.kbase.workspace.database.Permission; import us.kbase.workspace.database.PermissionSet; diff --git a/src/us/kbase/workspace/test/workspace/PermissionsCheckerFactoryTest.java b/service/src/test/java/us/kbase/test/workspace/workspace/PermissionsCheckerFactoryTest.java similarity index 99% rename from src/us/kbase/workspace/test/workspace/PermissionsCheckerFactoryTest.java rename to service/src/test/java/us/kbase/test/workspace/workspace/PermissionsCheckerFactoryTest.java index f34fc13f5..2b53d36c8 100644 --- a/src/us/kbase/workspace/test/workspace/PermissionsCheckerFactoryTest.java +++ b/service/src/test/java/us/kbase/test/workspace/workspace/PermissionsCheckerFactoryTest.java @@ -1,12 +1,12 @@ -package us.kbase.workspace.test.workspace; +package us.kbase.test.workspace.workspace; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -import static us.kbase.common.test.TestCommon.opt; -import static us.kbase.common.test.TestCommon.set; +import static us.kbase.test.common.TestCommon.opt; +import static us.kbase.test.common.TestCommon.set; import java.util.Arrays; import java.util.Collections; @@ -18,8 +18,8 @@ import com.google.common.collect.ImmutableMap; -import us.kbase.common.test.MapBuilder; -import us.kbase.common.test.TestCommon; +import us.kbase.test.common.MapBuilder; +import us.kbase.test.common.TestCommon; import us.kbase.workspace.database.AllUsers; import us.kbase.workspace.database.ObjectIDResolvedWS; import us.kbase.workspace.database.ObjectIdentifier; diff --git a/src/us/kbase/workspace/test/workspace/RefLimitTest.java b/service/src/test/java/us/kbase/test/workspace/workspace/RefLimitTest.java similarity index 98% rename from src/us/kbase/workspace/test/workspace/RefLimitTest.java rename to service/src/test/java/us/kbase/test/workspace/workspace/RefLimitTest.java index 024b64449..8c4da81e8 100644 --- a/src/us/kbase/workspace/test/workspace/RefLimitTest.java +++ b/service/src/test/java/us/kbase/test/workspace/workspace/RefLimitTest.java @@ -1,9 +1,9 @@ -package us.kbase.workspace.test.workspace; +package us.kbase.test.workspace.workspace; -import static us.kbase.common.test.TestCommon.assertExceptionCorrect; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; import static org.junit.Assert.fail; +import static us.kbase.test.common.TestCommon.assertExceptionCorrect; import java.util.Arrays; import java.util.Map; @@ -13,7 +13,7 @@ import org.junit.Test; import nl.jqno.equalsverifier.EqualsVerifier; -import us.kbase.common.test.MapBuilder; +import us.kbase.test.common.MapBuilder; import us.kbase.workspace.database.RefLimit; public class RefLimitTest { diff --git a/src/us/kbase/workspace/test/workspace/ReferenceGraphSearchTest.java b/service/src/test/java/us/kbase/test/workspace/workspace/ReferenceGraphSearchTest.java similarity index 97% rename from src/us/kbase/workspace/test/workspace/ReferenceGraphSearchTest.java rename to service/src/test/java/us/kbase/test/workspace/workspace/ReferenceGraphSearchTest.java index 08ca58562..7b609075d 100644 --- a/src/us/kbase/workspace/test/workspace/ReferenceGraphSearchTest.java +++ b/service/src/test/java/us/kbase/test/workspace/workspace/ReferenceGraphSearchTest.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.workspace; +package us.kbase.test.workspace.workspace; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; @@ -14,7 +14,7 @@ import com.google.common.collect.Sets; -import us.kbase.common.test.TestCommon; +import us.kbase.test.common.TestCommon; import us.kbase.workspace.database.Reference; import us.kbase.workspace.database.refsearch.ReferenceGraphSearch; import us.kbase.workspace.database.refsearch.ReferenceGraphTopologyProvider; diff --git a/src/us/kbase/workspace/test/workspace/ReferenceSearchTreeTest.java b/service/src/test/java/us/kbase/test/workspace/workspace/ReferenceSearchTreeTest.java similarity index 99% rename from src/us/kbase/workspace/test/workspace/ReferenceSearchTreeTest.java rename to service/src/test/java/us/kbase/test/workspace/workspace/ReferenceSearchTreeTest.java index 567097f21..bf8e4ddfb 100644 --- a/src/us/kbase/workspace/test/workspace/ReferenceSearchTreeTest.java +++ b/service/src/test/java/us/kbase/test/workspace/workspace/ReferenceSearchTreeTest.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.workspace; +package us.kbase.test.workspace.workspace; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; diff --git a/src/us/kbase/workspace/test/workspace/ReferenceTest.java b/service/src/test/java/us/kbase/test/workspace/workspace/ReferenceTest.java similarity index 98% rename from src/us/kbase/workspace/test/workspace/ReferenceTest.java rename to service/src/test/java/us/kbase/test/workspace/workspace/ReferenceTest.java index 53f2ee96a..1efd4e902 100644 --- a/src/us/kbase/workspace/test/workspace/ReferenceTest.java +++ b/service/src/test/java/us/kbase/test/workspace/workspace/ReferenceTest.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.workspace; +package us.kbase.test.workspace.workspace; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; diff --git a/src/us/kbase/workspace/test/workspace/ReferenceTreeNodeTest.java b/service/src/test/java/us/kbase/test/workspace/workspace/ReferenceTreeNodeTest.java similarity index 97% rename from src/us/kbase/workspace/test/workspace/ReferenceTreeNodeTest.java rename to service/src/test/java/us/kbase/test/workspace/workspace/ReferenceTreeNodeTest.java index 08562d0b5..7d3cbb53b 100644 --- a/src/us/kbase/workspace/test/workspace/ReferenceTreeNodeTest.java +++ b/service/src/test/java/us/kbase/test/workspace/workspace/ReferenceTreeNodeTest.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.workspace; +package us.kbase.test.workspace.workspace; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; diff --git a/src/us/kbase/workspace/test/workspace/ResolvedObjectIdentifierTest.java b/service/src/test/java/us/kbase/test/workspace/workspace/ResolvedObjectIdentifierTest.java similarity index 98% rename from src/us/kbase/workspace/test/workspace/ResolvedObjectIdentifierTest.java rename to service/src/test/java/us/kbase/test/workspace/workspace/ResolvedObjectIdentifierTest.java index d8d696a15..e82b19eca 100644 --- a/src/us/kbase/workspace/test/workspace/ResolvedObjectIdentifierTest.java +++ b/service/src/test/java/us/kbase/test/workspace/workspace/ResolvedObjectIdentifierTest.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.workspace; +package us.kbase.test.workspace.workspace; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; @@ -7,7 +7,7 @@ import org.junit.Test; import nl.jqno.equalsverifier.EqualsVerifier; -import us.kbase.common.test.TestCommon; +import us.kbase.test.common.TestCommon; import us.kbase.workspace.database.Reference; import us.kbase.workspace.database.ResolvedObjectID; import us.kbase.workspace.database.ResolvedObjectIDNoVer; diff --git a/src/us/kbase/workspace/test/workspace/ResolvedWorkspaceIDTest.java b/service/src/test/java/us/kbase/test/workspace/workspace/ResolvedWorkspaceIDTest.java similarity index 96% rename from src/us/kbase/workspace/test/workspace/ResolvedWorkspaceIDTest.java rename to service/src/test/java/us/kbase/test/workspace/workspace/ResolvedWorkspaceIDTest.java index f716e0573..ffc2c1fb0 100644 --- a/src/us/kbase/workspace/test/workspace/ResolvedWorkspaceIDTest.java +++ b/service/src/test/java/us/kbase/test/workspace/workspace/ResolvedWorkspaceIDTest.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.workspace; +package us.kbase.test.workspace.workspace; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; @@ -7,7 +7,7 @@ import org.junit.Test; import nl.jqno.equalsverifier.EqualsVerifier; -import us.kbase.common.test.TestCommon; +import us.kbase.test.common.TestCommon; import us.kbase.workspace.database.ResolvedWorkspaceID; diff --git a/src/us/kbase/workspace/test/workspace/TestIDReferenceHandlerFactory.java b/service/src/test/java/us/kbase/test/workspace/workspace/TestIDReferenceHandlerFactory.java similarity index 99% rename from src/us/kbase/workspace/test/workspace/TestIDReferenceHandlerFactory.java rename to service/src/test/java/us/kbase/test/workspace/workspace/TestIDReferenceHandlerFactory.java index 587992d8e..53e68679f 100644 --- a/src/us/kbase/workspace/test/workspace/TestIDReferenceHandlerFactory.java +++ b/service/src/test/java/us/kbase/test/workspace/workspace/TestIDReferenceHandlerFactory.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.workspace; +package us.kbase.test.workspace.workspace; import java.util.Arrays; import java.util.HashMap; diff --git a/src/us/kbase/workspace/test/workspace/UncheckedUserMetadataTest.java b/service/src/test/java/us/kbase/test/workspace/workspace/UncheckedUserMetadataTest.java similarity index 98% rename from src/us/kbase/workspace/test/workspace/UncheckedUserMetadataTest.java rename to service/src/test/java/us/kbase/test/workspace/workspace/UncheckedUserMetadataTest.java index 24723b6b1..66cb8d3c7 100644 --- a/src/us/kbase/workspace/test/workspace/UncheckedUserMetadataTest.java +++ b/service/src/test/java/us/kbase/test/workspace/workspace/UncheckedUserMetadataTest.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.workspace; +package us.kbase.test.workspace.workspace; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; diff --git a/src/us/kbase/workspace/test/workspace/UserWorkspaceIDsTest.java b/service/src/test/java/us/kbase/test/workspace/workspace/UserWorkspaceIDsTest.java similarity index 97% rename from src/us/kbase/workspace/test/workspace/UserWorkspaceIDsTest.java rename to service/src/test/java/us/kbase/test/workspace/workspace/UserWorkspaceIDsTest.java index 76ccc255c..725d5206f 100644 --- a/src/us/kbase/workspace/test/workspace/UserWorkspaceIDsTest.java +++ b/service/src/test/java/us/kbase/test/workspace/workspace/UserWorkspaceIDsTest.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.workspace; +package us.kbase.test.workspace.workspace; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; @@ -14,7 +14,7 @@ import org.junit.Test; import nl.jqno.equalsverifier.EqualsVerifier; -import us.kbase.common.test.TestCommon; +import us.kbase.test.common.TestCommon; import us.kbase.workspace.database.Permission; import us.kbase.workspace.database.UserWorkspaceIDs; import us.kbase.workspace.database.WorkspaceUser; diff --git a/src/us/kbase/workspace/test/workspace/WorkspaceConstructorTest.java b/service/src/test/java/us/kbase/test/workspace/workspace/WorkspaceConstructorTest.java similarity index 98% rename from src/us/kbase/workspace/test/workspace/WorkspaceConstructorTest.java rename to service/src/test/java/us/kbase/test/workspace/workspace/WorkspaceConstructorTest.java index 67cfe5706..e71a05c9d 100644 --- a/src/us/kbase/workspace/test/workspace/WorkspaceConstructorTest.java +++ b/service/src/test/java/us/kbase/test/workspace/workspace/WorkspaceConstructorTest.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.workspace; +package us.kbase.test.workspace.workspace; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; @@ -10,7 +10,7 @@ import org.junit.Test; -import us.kbase.common.test.TestCommon; +import us.kbase.test.common.TestCommon; import us.kbase.typedobj.core.TempFilesManager; import us.kbase.typedobj.core.TypedObjectValidator; import us.kbase.workspace.database.ResourceUsageConfigurationBuilder; diff --git a/src/us/kbase/workspace/test/workspace/WorkspaceInformationTest.java b/service/src/test/java/us/kbase/test/workspace/workspace/WorkspaceInformationTest.java similarity index 99% rename from src/us/kbase/workspace/test/workspace/WorkspaceInformationTest.java rename to service/src/test/java/us/kbase/test/workspace/workspace/WorkspaceInformationTest.java index 2a2900e2a..e6e82fe34 100644 --- a/src/us/kbase/workspace/test/workspace/WorkspaceInformationTest.java +++ b/service/src/test/java/us/kbase/test/workspace/workspace/WorkspaceInformationTest.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.workspace; +package us.kbase.test.workspace.workspace; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.fail; @@ -11,7 +11,7 @@ import com.google.common.collect.ImmutableMap; import nl.jqno.equalsverifier.EqualsVerifier; -import us.kbase.common.test.TestCommon; +import us.kbase.test.common.TestCommon; import us.kbase.workspace.database.Permission; import us.kbase.workspace.database.UncheckedUserMetadata; import us.kbase.workspace.database.WorkspaceInformation; diff --git a/src/us/kbase/workspace/test/workspace/WorkspaceIntegrationWithGridFSTest.java b/service/src/test/java/us/kbase/test/workspace/workspace/WorkspaceIntegrationWithGridFSTest.java similarity index 96% rename from src/us/kbase/workspace/test/workspace/WorkspaceIntegrationWithGridFSTest.java rename to service/src/test/java/us/kbase/test/workspace/workspace/WorkspaceIntegrationWithGridFSTest.java index ffbb3681d..c948c07f5 100644 --- a/src/us/kbase/workspace/test/workspace/WorkspaceIntegrationWithGridFSTest.java +++ b/service/src/test/java/us/kbase/test/workspace/workspace/WorkspaceIntegrationWithGridFSTest.java @@ -1,18 +1,18 @@ -package us.kbase.workspace.test.workspace; +package us.kbase.test.workspace.workspace; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; -import static us.kbase.workspace.test.WorkspaceTestCommon.basicProv; -import static us.kbase.workspace.test.WorkspaceTestCommon.SAFE_DATA; -import static us.kbase.workspace.test.WorkspaceTestCommon.SAFE_DATA_MD5; -import static us.kbase.workspace.test.WorkspaceTestCommon.SAFE_DATA_SIZE; -import static us.kbase.workspace.test.WorkspaceTestCommon.ATYPE; -import static us.kbase.workspace.test.WorkspaceTestCommon.ATYPE_1_0; -import static us.kbase.workspace.test.WorkspaceTestCommon.ATYPE2; -import static us.kbase.workspace.test.WorkspaceTestCommon.ATYPE2_2_1; -import static us.kbase.workspace.test.WorkspaceTestCommon.ATYPE2_2_0; -import static us.kbase.workspace.test.WorkspaceTestCommon.ATYPE2_1_0; -import static us.kbase.workspace.test.WorkspaceTestCommon.ATYPE2_0_1; +import static us.kbase.test.workspace.WorkspaceTestCommon.ATYPE; +import static us.kbase.test.workspace.WorkspaceTestCommon.ATYPE2; +import static us.kbase.test.workspace.WorkspaceTestCommon.ATYPE2_0_1; +import static us.kbase.test.workspace.WorkspaceTestCommon.ATYPE2_1_0; +import static us.kbase.test.workspace.WorkspaceTestCommon.ATYPE2_2_0; +import static us.kbase.test.workspace.WorkspaceTestCommon.ATYPE2_2_1; +import static us.kbase.test.workspace.WorkspaceTestCommon.ATYPE_1_0; +import static us.kbase.test.workspace.WorkspaceTestCommon.SAFE_DATA; +import static us.kbase.test.workspace.WorkspaceTestCommon.SAFE_DATA_MD5; +import static us.kbase.test.workspace.WorkspaceTestCommon.SAFE_DATA_SIZE; +import static us.kbase.test.workspace.WorkspaceTestCommon.basicProv; import java.io.File; import java.nio.file.Paths; @@ -38,8 +38,9 @@ import ch.qos.logback.classic.Level; import ch.qos.logback.classic.Logger; -import us.kbase.common.test.TestCommon; -import us.kbase.common.test.controllers.mongo.MongoController; +import us.kbase.testutils.controllers.mongo.MongoController; +import us.kbase.test.common.TestCommon; +import us.kbase.test.workspace.WorkspaceTestCommon; import us.kbase.typedobj.core.AbsoluteTypeDefId; import us.kbase.typedobj.core.LocalTypeProvider; import us.kbase.typedobj.core.TempFilesManager; @@ -68,7 +69,6 @@ import us.kbase.workspace.database.mongo.GridFSBlobStore; import us.kbase.workspace.database.mongo.MongoWorkspaceDB; import us.kbase.workspace.database.provenance.Provenance; -import us.kbase.workspace.test.WorkspaceTestCommon; /** Workspace library level integration tests that don't need to be run against multiple * backends or with varying memory usage strategies. See the notes in {@link WorkspaceTest}. @@ -114,7 +114,6 @@ public static void setUpClass() throws Exception { System.out.println("Using Mongo temp dir " + MONGO.getTempDir()); System.out.println("Started test mongo instance at localhost: " + MONGO.getServerPort()); - @SuppressWarnings("resource") final MongoClient mcli = MongoClients.create("mongodb://localhost:" + MONGO.getServerPort()); WSDB = mcli.getDatabase(WSDB_NAME); TYPEDB = mcli.getDatabase(TYPEDB_NAME); diff --git a/src/us/kbase/workspace/test/workspace/WorkspaceListenerTest.java b/service/src/test/java/us/kbase/test/workspace/workspace/WorkspaceListenerTest.java similarity index 99% rename from src/us/kbase/workspace/test/workspace/WorkspaceListenerTest.java rename to service/src/test/java/us/kbase/test/workspace/workspace/WorkspaceListenerTest.java index 7a8226bae..ff5105d8f 100644 --- a/src/us/kbase/workspace/test/workspace/WorkspaceListenerTest.java +++ b/service/src/test/java/us/kbase/test/workspace/workspace/WorkspaceListenerTest.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.workspace; +package us.kbase.test.workspace.workspace; import static org.mockito.Mockito.any; import static org.mockito.Mockito.anyLong; @@ -10,9 +10,9 @@ import static org.mockito.Mockito.never; import static org.mockito.Mockito.when; import static org.mockito.Mockito.verify; -import static us.kbase.common.test.TestCommon.inst; -import static us.kbase.common.test.TestCommon.set; -import static us.kbase.workspace.test.WorkspaceTestCommon.basicProv; +import static us.kbase.test.common.TestCommon.inst; +import static us.kbase.test.common.TestCommon.set; +import static us.kbase.test.workspace.WorkspaceTestCommon.basicProv; import java.time.Instant; import java.util.Arrays; diff --git a/src/us/kbase/workspace/test/workspace/WorkspaceLongTest.java b/service/src/test/java/us/kbase/test/workspace/workspace/WorkspaceLongTest.java similarity index 98% rename from src/us/kbase/workspace/test/workspace/WorkspaceLongTest.java rename to service/src/test/java/us/kbase/test/workspace/workspace/WorkspaceLongTest.java index 7c8371448..5dd816c74 100644 --- a/src/us/kbase/workspace/test/workspace/WorkspaceLongTest.java +++ b/service/src/test/java/us/kbase/test/workspace/workspace/WorkspaceLongTest.java @@ -1,11 +1,10 @@ -package us.kbase.workspace.test.workspace; +package us.kbase.test.workspace.workspace; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; -import static us.kbase.common.test.TestCommon.opt; -import static us.kbase.workspace.test.LongTextForTestUsage.TEXT1000; -import static us.kbase.workspace.test.WorkspaceTestCommon.basicProv; - +import static us.kbase.test.common.TestCommon.opt; +import static us.kbase.test.workspace.LongTextForTestUsage.TEXT1000; +import static us.kbase.test.workspace.WorkspaceTestCommon.basicProv; import java.io.File; import java.io.InputStream; diff --git a/src/us/kbase/workspace/test/workspace/WorkspaceObjectDataTest.java b/service/src/test/java/us/kbase/test/workspace/workspace/WorkspaceObjectDataTest.java similarity index 98% rename from src/us/kbase/workspace/test/workspace/WorkspaceObjectDataTest.java rename to service/src/test/java/us/kbase/test/workspace/workspace/WorkspaceObjectDataTest.java index fb2a9af01..7ed890ed4 100644 --- a/src/us/kbase/workspace/test/workspace/WorkspaceObjectDataTest.java +++ b/service/src/test/java/us/kbase/test/workspace/workspace/WorkspaceObjectDataTest.java @@ -1,12 +1,12 @@ -package us.kbase.workspace.test.workspace; +package us.kbase.test.workspace.workspace; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; import static org.junit.Assert.fail; -import static us.kbase.common.test.TestCommon.assertExceptionCorrect; -import static us.kbase.common.test.TestCommon.inst; -import static us.kbase.common.test.TestCommon.opt; -import static us.kbase.workspace.test.WorkspaceTestCommon.basicProv; +import static us.kbase.test.common.TestCommon.assertExceptionCorrect; +import static us.kbase.test.common.TestCommon.inst; +import static us.kbase.test.common.TestCommon.opt; +import static us.kbase.test.workspace.WorkspaceTestCommon.basicProv; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -20,7 +20,7 @@ import com.google.common.collect.ImmutableMap; -import us.kbase.common.test.TestCommon; +import us.kbase.test.common.TestCommon; import us.kbase.typedobj.core.AbsoluteTypeDefId; import us.kbase.typedobj.core.SubsetSelection; import us.kbase.typedobj.core.TypeDefName; diff --git a/src/us/kbase/workspace/test/workspace/WorkspaceTest.java b/service/src/test/java/us/kbase/test/workspace/workspace/WorkspaceTest.java similarity index 99% rename from src/us/kbase/workspace/test/workspace/WorkspaceTest.java rename to service/src/test/java/us/kbase/test/workspace/workspace/WorkspaceTest.java index 819c0b8e0..3fe7df809 100644 --- a/src/us/kbase/workspace/test/workspace/WorkspaceTest.java +++ b/service/src/test/java/us/kbase/test/workspace/workspace/WorkspaceTest.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.workspace; +package us.kbase.test.workspace.workspace; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.nullValue; @@ -8,18 +8,18 @@ import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; -import static us.kbase.common.test.TestCommon.inst; -import static us.kbase.common.test.TestCommon.list; -import static us.kbase.common.test.TestCommon.now; -import static us.kbase.common.test.TestCommon.opt; -import static us.kbase.common.test.TestCommon.set; -import static us.kbase.workspace.test.LongTextForTestUsage.LONG_TEXT_PART; -import static us.kbase.workspace.test.LongTextForTestUsage.LONG_TEXT; -import static us.kbase.workspace.test.LongTextForTestUsage.TEXT100; -import static us.kbase.workspace.test.LongTextForTestUsage.TEXT101; -import static us.kbase.workspace.test.LongTextForTestUsage.TEXT256; -import static us.kbase.workspace.test.LongTextForTestUsage.TEXT1000; -import static us.kbase.workspace.test.WorkspaceTestCommon.basicProv; +import static us.kbase.test.common.TestCommon.inst; +import static us.kbase.test.common.TestCommon.list; +import static us.kbase.test.common.TestCommon.now; +import static us.kbase.test.common.TestCommon.opt; +import static us.kbase.test.common.TestCommon.set; +import static us.kbase.test.workspace.LongTextForTestUsage.LONG_TEXT; +import static us.kbase.test.workspace.LongTextForTestUsage.LONG_TEXT_PART; +import static us.kbase.test.workspace.LongTextForTestUsage.TEXT100; +import static us.kbase.test.workspace.LongTextForTestUsage.TEXT1000; +import static us.kbase.test.workspace.LongTextForTestUsage.TEXT101; +import static us.kbase.test.workspace.LongTextForTestUsage.TEXT256; +import static us.kbase.test.workspace.WorkspaceTestCommon.basicProv; import java.io.File; import java.io.StringReader; @@ -57,7 +57,7 @@ import com.google.common.collect.Sets; import us.kbase.common.service.JsonTokenStream; -import us.kbase.common.test.TestCommon; +import us.kbase.test.common.TestCommon; import us.kbase.typedobj.core.AbsoluteTypeDefId; import us.kbase.typedobj.core.SubsetSelection; import us.kbase.typedobj.core.TempFileListener; diff --git a/src/us/kbase/workspace/test/workspace/WorkspaceTester.java b/service/src/test/java/us/kbase/test/workspace/workspace/WorkspaceTester.java similarity index 98% rename from src/us/kbase/workspace/test/workspace/WorkspaceTester.java rename to service/src/test/java/us/kbase/test/workspace/workspace/WorkspaceTester.java index 1e4e6e3f3..98b18ad1f 100644 --- a/src/us/kbase/workspace/test/workspace/WorkspaceTester.java +++ b/service/src/test/java/us/kbase/test/workspace/workspace/WorkspaceTester.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.workspace; +package us.kbase.test.workspace.workspace; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertNotNull; @@ -6,14 +6,14 @@ import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; -import static us.kbase.common.test.TestCommon.assertExceptionCorrect; -import static us.kbase.workspace.test.WorkspaceTestCommon.ATYPE_0_1; -import static us.kbase.workspace.test.WorkspaceTestCommon.ATYPE_1_0; -import static us.kbase.workspace.test.WorkspaceTestCommon.ATYPE_2_0; -import static us.kbase.workspace.test.WorkspaceTestCommon.ATYPE2_0_1; -import static us.kbase.workspace.test.WorkspaceTestCommon.ATYPE2_1_0; -import static us.kbase.workspace.test.WorkspaceTestCommon.ATYPE2_2_0; -import static us.kbase.workspace.test.WorkspaceTestCommon.ATYPE2_2_1; +import static us.kbase.test.common.TestCommon.assertExceptionCorrect; +import static us.kbase.test.workspace.WorkspaceTestCommon.ATYPE2_0_1; +import static us.kbase.test.workspace.WorkspaceTestCommon.ATYPE2_1_0; +import static us.kbase.test.workspace.WorkspaceTestCommon.ATYPE2_2_0; +import static us.kbase.test.workspace.WorkspaceTestCommon.ATYPE2_2_1; +import static us.kbase.test.workspace.WorkspaceTestCommon.ATYPE_0_1; +import static us.kbase.test.workspace.WorkspaceTestCommon.ATYPE_1_0; +import static us.kbase.test.workspace.WorkspaceTestCommon.ATYPE_2_0; import java.io.File; import java.io.IOException; @@ -44,9 +44,12 @@ import org.junit.runners.Parameterized.Parameters; import org.slf4j.LoggerFactory; -import us.kbase.common.test.TestCommon; -import us.kbase.common.test.TestException; -import us.kbase.common.test.controllers.mongo.MongoController; +import us.kbase.testutils.TestException; +import us.kbase.testutils.controllers.minio.MinioController; +import us.kbase.testutils.controllers.mongo.MongoController; +import us.kbase.test.common.TestCommon; +import us.kbase.test.workspace.JsonTokenStreamOCStat; +import us.kbase.test.workspace.WorkspaceTestCommon; import us.kbase.typedobj.core.LocalTypeProvider; import us.kbase.typedobj.core.TempFilesManager; import us.kbase.typedobj.core.TypeDefId; @@ -88,9 +91,6 @@ import us.kbase.workspace.database.provenance.Provenance; import us.kbase.workspace.database.provenance.ProvenanceAction; import us.kbase.workspace.database.provenance.SubAction; -import us.kbase.workspace.test.JsonTokenStreamOCStat; -import us.kbase.workspace.test.WorkspaceTestCommon; -import us.kbase.workspace.test.controllers.minio.MinioController; import ch.qos.logback.classic.Level; import ch.qos.logback.classic.Logger; import software.amazon.awssdk.regions.Region; @@ -204,7 +204,6 @@ public WorkspaceTester( mongo.getServerPort()); } if (!CONFIGS.containsKey(config)) { - @SuppressWarnings("resource") final MongoClient mcli = MongoClients.create("mongodb://localhost:" + mongo.getServerPort()); final MongoDatabase wsdb = mcli.getDatabase(DB_WS_NAME); final MongoDatabase tdb = mcli.getDatabase(DB_TYPE_NAME); diff --git a/src/us/kbase/workspace/test/workspace/WorkspaceUnitTest.java b/service/src/test/java/us/kbase/test/workspace/workspace/WorkspaceUnitTest.java similarity index 99% rename from src/us/kbase/workspace/test/workspace/WorkspaceUnitTest.java rename to service/src/test/java/us/kbase/test/workspace/workspace/WorkspaceUnitTest.java index e6cae3287..2303288d4 100644 --- a/src/us/kbase/workspace/test/workspace/WorkspaceUnitTest.java +++ b/service/src/test/java/us/kbase/test/workspace/workspace/WorkspaceUnitTest.java @@ -1,4 +1,4 @@ -package us.kbase.workspace.test.workspace; +package us.kbase.test.workspace.workspace; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; @@ -11,10 +11,10 @@ import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import static us.kbase.common.test.TestCommon.now; -import static us.kbase.common.test.TestCommon.list; -import static us.kbase.common.test.TestCommon.set; -import static us.kbase.workspace.test.WorkspaceTestCommon.basicProv; +import static us.kbase.test.common.TestCommon.list; +import static us.kbase.test.common.TestCommon.now; +import static us.kbase.test.common.TestCommon.set; +import static us.kbase.test.workspace.WorkspaceTestCommon.basicProv; import java.io.IOException; import java.time.Instant; @@ -51,7 +51,7 @@ import us.kbase.workspace.exceptions.WorkspaceAuthorizationException; import us.kbase.auth.AuthToken; import us.kbase.common.service.UObject; -import us.kbase.common.test.TestCommon; +import us.kbase.test.common.TestCommon; import us.kbase.typedobj.core.AbsoluteTypeDefId; import us.kbase.typedobj.core.SubsetSelection; import us.kbase.typedobj.core.TempFilesManager; diff --git a/src/us/kbase/workspace/test/workspace/WorkspaceUserMetadataTest.java b/service/src/test/java/us/kbase/test/workspace/workspace/WorkspaceUserMetadataTest.java similarity index 98% rename from src/us/kbase/workspace/test/workspace/WorkspaceUserMetadataTest.java rename to service/src/test/java/us/kbase/test/workspace/workspace/WorkspaceUserMetadataTest.java index 33830193e..29b320529 100644 --- a/src/us/kbase/workspace/test/workspace/WorkspaceUserMetadataTest.java +++ b/service/src/test/java/us/kbase/test/workspace/workspace/WorkspaceUserMetadataTest.java @@ -1,9 +1,9 @@ -package us.kbase.workspace.test.workspace; +package us.kbase.test.workspace.workspace; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; import static org.junit.Assert.fail; -import static us.kbase.common.test.TestCommon.assertExceptionCorrect; +import static us.kbase.test.common.TestCommon.assertExceptionCorrect; import java.util.HashMap; import java.util.Map; diff --git a/src/us/kbase/typedobj/db/test/backward.Annotations.2.spec.properties b/service/src/test/resources/us/kbase/test/typedobj/db/backward.Annotations.2.spec.properties similarity index 100% rename from src/us/kbase/typedobj/db/test/backward.Annotations.2.spec.properties rename to service/src/test/resources/us/kbase/test/typedobj/db/backward.Annotations.2.spec.properties diff --git a/src/us/kbase/typedobj/db/test/backward.Annotations.3.spec.properties b/service/src/test/resources/us/kbase/test/typedobj/db/backward.Annotations.3.spec.properties similarity index 100% rename from src/us/kbase/typedobj/db/test/backward.Annotations.3.spec.properties rename to service/src/test/resources/us/kbase/test/typedobj/db/backward.Annotations.3.spec.properties diff --git a/src/us/kbase/typedobj/db/test/backward.Annotations.4.spec.properties b/service/src/test/resources/us/kbase/test/typedobj/db/backward.Annotations.4.spec.properties similarity index 100% rename from src/us/kbase/typedobj/db/test/backward.Annotations.4.spec.properties rename to service/src/test/resources/us/kbase/test/typedobj/db/backward.Annotations.4.spec.properties diff --git a/src/us/kbase/typedobj/db/test/backward.Annotations.spec.properties b/service/src/test/resources/us/kbase/test/typedobj/db/backward.Annotations.spec.properties similarity index 100% rename from src/us/kbase/typedobj/db/test/backward.Annotations.spec.properties rename to service/src/test/resources/us/kbase/test/typedobj/db/backward.Annotations.spec.properties diff --git a/src/us/kbase/typedobj/db/test/backward.Expression.2.spec.properties b/service/src/test/resources/us/kbase/test/typedobj/db/backward.Expression.2.spec.properties similarity index 100% rename from src/us/kbase/typedobj/db/test/backward.Expression.2.spec.properties rename to service/src/test/resources/us/kbase/test/typedobj/db/backward.Expression.2.spec.properties diff --git a/src/us/kbase/typedobj/db/test/backward.Expression.spec.properties b/service/src/test/resources/us/kbase/test/typedobj/db/backward.Expression.spec.properties similarity index 100% rename from src/us/kbase/typedobj/db/test/backward.Expression.spec.properties rename to service/src/test/resources/us/kbase/test/typedobj/db/backward.Expression.spec.properties diff --git a/src/us/kbase/typedobj/db/test/backward.Regulation.2.spec.properties b/service/src/test/resources/us/kbase/test/typedobj/db/backward.Regulation.2.spec.properties similarity index 100% rename from src/us/kbase/typedobj/db/test/backward.Regulation.2.spec.properties rename to service/src/test/resources/us/kbase/test/typedobj/db/backward.Regulation.2.spec.properties diff --git a/src/us/kbase/typedobj/db/test/backward.Regulation.3.spec.properties b/service/src/test/resources/us/kbase/test/typedobj/db/backward.Regulation.3.spec.properties similarity index 100% rename from src/us/kbase/typedobj/db/test/backward.Regulation.3.spec.properties rename to service/src/test/resources/us/kbase/test/typedobj/db/backward.Regulation.3.spec.properties diff --git a/src/us/kbase/typedobj/db/test/backward.Regulation.4.spec.properties b/service/src/test/resources/us/kbase/test/typedobj/db/backward.Regulation.4.spec.properties similarity index 100% rename from src/us/kbase/typedobj/db/test/backward.Regulation.4.spec.properties rename to service/src/test/resources/us/kbase/test/typedobj/db/backward.Regulation.4.spec.properties diff --git a/src/us/kbase/typedobj/db/test/backward.Regulation.spec.properties b/service/src/test/resources/us/kbase/test/typedobj/db/backward.Regulation.spec.properties similarity index 100% rename from src/us/kbase/typedobj/db/test/backward.Regulation.spec.properties rename to service/src/test/resources/us/kbase/test/typedobj/db/backward.Regulation.spec.properties diff --git a/src/us/kbase/typedobj/db/test/deps.DepModule.spec.properties b/service/src/test/resources/us/kbase/test/typedobj/db/deps.DepModule.spec.properties similarity index 100% rename from src/us/kbase/typedobj/db/test/deps.DepModule.spec.properties rename to service/src/test/resources/us/kbase/test/typedobj/db/deps.DepModule.spec.properties diff --git a/src/us/kbase/typedobj/db/test/deps.SomeModule.spec.properties b/service/src/test/resources/us/kbase/test/typedobj/db/deps.SomeModule.spec.properties similarity index 100% rename from src/us/kbase/typedobj/db/test/deps.SomeModule.spec.properties rename to service/src/test/resources/us/kbase/test/typedobj/db/deps.SomeModule.spec.properties diff --git a/src/us/kbase/typedobj/db/test/descr.Descr.spec.properties b/service/src/test/resources/us/kbase/test/typedobj/db/descr.Descr.spec.properties similarity index 100% rename from src/us/kbase/typedobj/db/test/descr.Descr.spec.properties rename to service/src/test/resources/us/kbase/test/typedobj/db/descr.Descr.spec.properties diff --git a/src/us/kbase/typedobj/db/test/error.Common.spec.properties b/service/src/test/resources/us/kbase/test/typedobj/db/error.Common.spec.properties similarity index 100% rename from src/us/kbase/typedobj/db/test/error.Common.spec.properties rename to service/src/test/resources/us/kbase/test/typedobj/db/error.Common.spec.properties diff --git a/src/us/kbase/typedobj/db/test/error.DoubleModule.spec.properties b/service/src/test/resources/us/kbase/test/typedobj/db/error.DoubleModule.spec.properties similarity index 100% rename from src/us/kbase/typedobj/db/test/error.DoubleModule.spec.properties rename to service/src/test/resources/us/kbase/test/typedobj/db/error.DoubleModule.spec.properties diff --git a/src/us/kbase/typedobj/db/test/error.LongFuncName.spec.properties b/service/src/test/resources/us/kbase/test/typedobj/db/error.LongFuncName.spec.properties similarity index 100% rename from src/us/kbase/typedobj/db/test/error.LongFuncName.spec.properties rename to service/src/test/resources/us/kbase/test/typedobj/db/error.LongFuncName.spec.properties diff --git a/src/us/kbase/typedobj/db/test/error.LongTypeName.spec.properties b/service/src/test/resources/us/kbase/test/typedobj/db/error.LongTypeName.spec.properties similarity index 100% rename from src/us/kbase/typedobj/db/test/error.LongTypeName.spec.properties rename to service/src/test/resources/us/kbase/test/typedobj/db/error.LongTypeName.spec.properties diff --git a/src/us/kbase/typedobj/db/test/error.StructDuplication.spec.properties b/service/src/test/resources/us/kbase/test/typedobj/db/error.StructDuplication.spec.properties similarity index 100% rename from src/us/kbase/typedobj/db/test/error.StructDuplication.spec.properties rename to service/src/test/resources/us/kbase/test/typedobj/db/error.StructDuplication.spec.properties diff --git a/src/us/kbase/typedobj/db/test/error.Test.spec.properties b/service/src/test/resources/us/kbase/test/typedobj/db/error.Test.spec.properties similarity index 100% rename from src/us/kbase/typedobj/db/test/error.Test.spec.properties rename to service/src/test/resources/us/kbase/test/typedobj/db/error.Test.spec.properties diff --git a/src/us/kbase/typedobj/db/test/md5.Common.2.spec.properties b/service/src/test/resources/us/kbase/test/typedobj/db/md5.Common.2.spec.properties similarity index 100% rename from src/us/kbase/typedobj/db/test/md5.Common.2.spec.properties rename to service/src/test/resources/us/kbase/test/typedobj/db/md5.Common.2.spec.properties diff --git a/src/us/kbase/typedobj/db/test/md5.Common.3.spec.properties b/service/src/test/resources/us/kbase/test/typedobj/db/md5.Common.3.spec.properties similarity index 100% rename from src/us/kbase/typedobj/db/test/md5.Common.3.spec.properties rename to service/src/test/resources/us/kbase/test/typedobj/db/md5.Common.3.spec.properties diff --git a/src/us/kbase/typedobj/db/test/md5.Common.spec.properties b/service/src/test/resources/us/kbase/test/typedobj/db/md5.Common.spec.properties similarity index 100% rename from src/us/kbase/typedobj/db/test/md5.Common.spec.properties rename to service/src/test/resources/us/kbase/test/typedobj/db/md5.Common.spec.properties diff --git a/src/us/kbase/typedobj/db/test/md5.Upper.spec.properties b/service/src/test/resources/us/kbase/test/typedobj/db/md5.Upper.spec.properties similarity index 100% rename from src/us/kbase/typedobj/db/test/md5.Upper.spec.properties rename to service/src/test/resources/us/kbase/test/typedobj/db/md5.Upper.spec.properties diff --git a/src/us/kbase/typedobj/db/test/restrict.Common.2.spec.properties b/service/src/test/resources/us/kbase/test/typedobj/db/restrict.Common.2.spec.properties similarity index 100% rename from src/us/kbase/typedobj/db/test/restrict.Common.2.spec.properties rename to service/src/test/resources/us/kbase/test/typedobj/db/restrict.Common.2.spec.properties diff --git a/src/us/kbase/typedobj/db/test/restrict.Common.spec.properties b/service/src/test/resources/us/kbase/test/typedobj/db/restrict.Common.spec.properties similarity index 100% rename from src/us/kbase/typedobj/db/test/restrict.Common.spec.properties rename to service/src/test/resources/us/kbase/test/typedobj/db/restrict.Common.spec.properties diff --git a/src/us/kbase/typedobj/db/test/restrict.Middle.spec.properties b/service/src/test/resources/us/kbase/test/typedobj/db/restrict.Middle.spec.properties similarity index 100% rename from src/us/kbase/typedobj/db/test/restrict.Middle.spec.properties rename to service/src/test/resources/us/kbase/test/typedobj/db/restrict.Middle.spec.properties diff --git a/src/us/kbase/typedobj/db/test/restrict.Upper.spec.properties b/service/src/test/resources/us/kbase/test/typedobj/db/restrict.Upper.spec.properties similarity index 100% rename from src/us/kbase/typedobj/db/test/restrict.Upper.spec.properties rename to service/src/test/resources/us/kbase/test/typedobj/db/restrict.Upper.spec.properties diff --git a/src/us/kbase/typedobj/db/test/rollback.First.spec.properties b/service/src/test/resources/us/kbase/test/typedobj/db/rollback.First.spec.properties similarity index 100% rename from src/us/kbase/typedobj/db/test/rollback.First.spec.properties rename to service/src/test/resources/us/kbase/test/typedobj/db/rollback.First.spec.properties diff --git a/src/us/kbase/typedobj/db/test/simple.Annotation.spec.properties b/service/src/test/resources/us/kbase/test/typedobj/db/simple.Annotation.spec.properties similarity index 100% rename from src/us/kbase/typedobj/db/test/simple.Annotation.spec.properties rename to service/src/test/resources/us/kbase/test/typedobj/db/simple.Annotation.spec.properties diff --git a/src/us/kbase/typedobj/db/test/simple.Regulation.2.spec.properties b/service/src/test/resources/us/kbase/test/typedobj/db/simple.Regulation.2.spec.properties similarity index 100% rename from src/us/kbase/typedobj/db/test/simple.Regulation.2.spec.properties rename to service/src/test/resources/us/kbase/test/typedobj/db/simple.Regulation.2.spec.properties diff --git a/src/us/kbase/typedobj/db/test/simple.Regulation.spec.properties b/service/src/test/resources/us/kbase/test/typedobj/db/simple.Regulation.spec.properties similarity index 100% rename from src/us/kbase/typedobj/db/test/simple.Regulation.spec.properties rename to service/src/test/resources/us/kbase/test/typedobj/db/simple.Regulation.spec.properties diff --git a/src/us/kbase/typedobj/db/test/simple.Sequence.spec.properties b/service/src/test/resources/us/kbase/test/typedobj/db/simple.Sequence.spec.properties similarity index 100% rename from src/us/kbase/typedobj/db/test/simple.Sequence.spec.properties rename to service/src/test/resources/us/kbase/test/typedobj/db/simple.Sequence.spec.properties diff --git a/src/us/kbase/typedobj/db/test/simple.Taxonomy.spec.properties b/service/src/test/resources/us/kbase/test/typedobj/db/simple.Taxonomy.spec.properties similarity index 100% rename from src/us/kbase/typedobj/db/test/simple.Taxonomy.spec.properties rename to service/src/test/resources/us/kbase/test/typedobj/db/simple.Taxonomy.spec.properties diff --git a/src/us/kbase/typedobj/db/test/stop.Dependant.spec.properties b/service/src/test/resources/us/kbase/test/typedobj/db/stop.Dependant.spec.properties similarity index 100% rename from src/us/kbase/typedobj/db/test/stop.Dependant.spec.properties rename to service/src/test/resources/us/kbase/test/typedobj/db/stop.Dependant.spec.properties diff --git a/src/us/kbase/typedobj/db/test/stop.Regulation.2.spec.properties b/service/src/test/resources/us/kbase/test/typedobj/db/stop.Regulation.2.spec.properties similarity index 100% rename from src/us/kbase/typedobj/db/test/stop.Regulation.2.spec.properties rename to service/src/test/resources/us/kbase/test/typedobj/db/stop.Regulation.2.spec.properties diff --git a/src/us/kbase/typedobj/db/test/stop.Regulation.spec.properties b/service/src/test/resources/us/kbase/test/typedobj/db/stop.Regulation.spec.properties similarity index 100% rename from src/us/kbase/typedobj/db/test/stop.Regulation.spec.properties rename to service/src/test/resources/us/kbase/test/typedobj/db/stop.Regulation.spec.properties diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/FBA.FBAModel.invalid.instance.1 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/FBA.FBAModel.invalid.instance.1 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/FBA.FBAModel.invalid.instance.1 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/FBA.FBAModel.invalid.instance.1 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/FBA.FBAModel.valid.instance.1 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/FBA.FBAModel.valid.instance.1 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/FBA.FBAModel.valid.instance.1 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/FBA.FBAModel.valid.instance.1 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/FBA.FBAModel.valid.instance.2 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/FBA.FBAModel.valid.instance.2 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/FBA.FBAModel.valid.instance.2 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/FBA.FBAModel.valid.instance.2 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/FBA.FBAResult.valid.instance.1 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/FBA.FBAResult.valid.instance.1 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/FBA.FBAResult.valid.instance.1 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/FBA.FBAResult.valid.instance.1 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/FBA.spec b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/FBA.spec similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/FBA.spec rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/FBA.spec diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.BigNumberObj.invalid.instance.1 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.BigNumberObj.invalid.instance.1 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.BigNumberObj.invalid.instance.1 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.BigNumberObj.invalid.instance.1 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.BigNumberObj.invalid.instance.2 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.BigNumberObj.invalid.instance.2 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.BigNumberObj.invalid.instance.2 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.BigNumberObj.invalid.instance.2 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.BigNumberObj.invalid.instance.3 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.BigNumberObj.invalid.instance.3 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.BigNumberObj.invalid.instance.3 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.BigNumberObj.invalid.instance.3 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.BigNumberObj.invalid.instance.4 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.BigNumberObj.invalid.instance.4 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.BigNumberObj.invalid.instance.4 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.BigNumberObj.invalid.instance.4 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.BigNumberObj.valid.instance.1 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.BigNumberObj.valid.instance.1 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.BigNumberObj.valid.instance.1 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.BigNumberObj.valid.instance.1 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.BigNumberObj.valid.instance.2 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.BigNumberObj.valid.instance.2 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.BigNumberObj.valid.instance.2 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.BigNumberObj.valid.instance.2 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.Genome.invalid.instance.1 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.Genome.invalid.instance.1 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.Genome.invalid.instance.1 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.Genome.invalid.instance.1 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.Genome.invalid.instance.2 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.Genome.invalid.instance.2 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.Genome.invalid.instance.2 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.Genome.invalid.instance.2 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.Genome.invalid.instance.3 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.Genome.invalid.instance.3 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.Genome.invalid.instance.3 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.Genome.invalid.instance.3 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.Genome.invalid.instance.4 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.Genome.invalid.instance.4 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.Genome.invalid.instance.4 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.Genome.invalid.instance.4 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.Genome.valid.instance.1 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.Genome.valid.instance.1 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.Genome.valid.instance.1 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.Genome.valid.instance.1 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.Genome.valid.instance.2 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.Genome.valid.instance.2 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.Genome.valid.instance.2 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.Genome.valid.instance.2 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.Genome.valid.instance.3 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.Genome.valid.instance.3 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.Genome.valid.instance.3 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.Genome.valid.instance.3 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.invalid.instance.1 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.invalid.instance.1 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.invalid.instance.1 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.invalid.instance.1 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.invalid.instance.10 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.invalid.instance.10 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.invalid.instance.10 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.invalid.instance.10 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.invalid.instance.11 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.invalid.instance.11 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.invalid.instance.11 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.invalid.instance.11 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.invalid.instance.12 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.invalid.instance.12 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.invalid.instance.12 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.invalid.instance.12 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.invalid.instance.13 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.invalid.instance.13 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.invalid.instance.13 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.invalid.instance.13 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.invalid.instance.14 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.invalid.instance.14 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.invalid.instance.14 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.invalid.instance.14 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.invalid.instance.15 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.invalid.instance.15 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.invalid.instance.15 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.invalid.instance.15 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.invalid.instance.16 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.invalid.instance.16 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.invalid.instance.16 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.invalid.instance.16 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.invalid.instance.17 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.invalid.instance.17 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.invalid.instance.17 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.invalid.instance.17 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.invalid.instance.2 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.invalid.instance.2 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.invalid.instance.2 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.invalid.instance.2 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.invalid.instance.3 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.invalid.instance.3 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.invalid.instance.3 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.invalid.instance.3 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.invalid.instance.4 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.invalid.instance.4 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.invalid.instance.4 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.invalid.instance.4 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.invalid.instance.5 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.invalid.instance.5 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.invalid.instance.5 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.invalid.instance.5 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.invalid.instance.6 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.invalid.instance.6 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.invalid.instance.6 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.invalid.instance.6 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.invalid.instance.7 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.invalid.instance.7 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.invalid.instance.7 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.invalid.instance.7 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.invalid.instance.8 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.invalid.instance.8 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.invalid.instance.8 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.invalid.instance.8 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.invalid.instance.9 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.invalid.instance.9 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.invalid.instance.9 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.invalid.instance.9 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.valid.instance.1 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.valid.instance.1 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.valid.instance.1 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.valid.instance.1 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.valid.instance.2 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.valid.instance.2 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.valid.instance.2 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.valid.instance.2 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.valid.instance.3 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.valid.instance.3 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.valid.instance.3 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.valid.instance.3 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.valid.instance.4 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.valid.instance.4 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.valid.instance.4 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.valid.instance.4 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.valid.instance.5 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.valid.instance.5 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.NumberObj.valid.instance.5 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.NumberObj.valid.instance.5 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.RandomObject.invalid.instance.1 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.RandomObject.invalid.instance.1 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.RandomObject.invalid.instance.1 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.RandomObject.invalid.instance.1 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.RandomObject.valid.instance.1 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.RandomObject.valid.instance.1 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.RandomObject.valid.instance.1 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.RandomObject.valid.instance.1 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.RandomObject.valid.instance.2 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.RandomObject.valid.instance.2 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.RandomObject.valid.instance.2 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.RandomObject.valid.instance.2 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.TupleObject.invalid.instance.1 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.TupleObject.invalid.instance.1 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.TupleObject.invalid.instance.1 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.TupleObject.invalid.instance.1 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.TupleObject.invalid.instance.2 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.TupleObject.invalid.instance.2 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.TupleObject.invalid.instance.2 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.TupleObject.invalid.instance.2 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.TupleObject.valid.instance.1 b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.TupleObject.valid.instance.1 similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.TupleObject.valid.instance.1 rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.TupleObject.valid.instance.1 diff --git a/src/us/kbase/typedobj/test/files/BasicValidation/KB.spec b/service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.spec similarity index 100% rename from src/us/kbase/typedobj/test/files/BasicValidation/KB.spec rename to service/src/test/resources/us/kbase/test/typedobj/files/BasicValidation/KB.spec diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/KB.spec b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/KB.spec similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/KB.spec rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/KB.spec diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.001 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.001 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.001 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.001 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.002 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.002 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.002 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.002 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.003 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.003 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.003 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.003 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.004 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.004 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.004 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.004 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.005 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.005 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.005 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.005 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.006 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.006 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.006 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.006 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.007 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.007 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.007 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.007 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.008 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.008 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.008 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.008 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.009 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.009 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.009 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.009 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.010 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.010 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.010 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.010 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.011 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.011 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.011 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.011 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.012 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.012 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.012 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.012 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.013 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.013 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.013 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.013 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.014 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.014 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.014 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.014 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.015 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.015 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.015 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.015 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.016 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.016 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.016 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.016 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.017 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.017 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.017 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.017 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.018 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.018 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.018 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.018 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.019 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.019 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.019 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.019 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.020 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.020 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.020 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.020 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.021 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.021 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.021 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.021 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.022 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.022 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.022 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.022 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.023 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.023 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.023 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.023 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.024 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.024 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.024 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.024 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.025 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.025 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.025 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.025 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.026 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.026 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.026 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.026 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.027 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.027 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.027 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.027 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.028 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.028 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.028 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.028 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.029 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.029 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.029 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.029 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.030 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.030 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.030 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.030 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.031 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.031 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.031 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.031 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.032 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.032 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.032 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.032 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.033 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.033 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.033 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.033 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.034 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.034 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.034 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.034 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.035 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.035 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.035 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.035 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.036 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.036 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.036 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.036 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.037 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.037 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.037 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.037 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.038 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.038 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.038 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.038 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.039 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.039 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.039 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.039 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.040 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.040 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.040 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.040 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.041 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.041 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.041 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.041 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.042 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.042 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.042 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.042 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.043 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.043 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.043 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.043 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.044 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.044 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.044 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.044 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.045 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.045 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.045 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.045 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.046 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.046 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.046 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.046 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.047 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.047 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.047 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.047 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.048 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.048 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.048 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.048 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.049 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.049 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.049 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.049 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.050 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.050 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.050 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.050 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.051 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.051 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.051 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.051 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.052 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.052 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.052 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.052 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.053 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.053 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.053 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.053 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.054 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.054 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.054 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.054 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.055 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.055 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.055 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.055 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.056 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.056 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.056 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.056 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.057 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.057 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.057 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.057 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.058 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.058 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.058 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.058 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.059 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.059 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.059 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.059 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.060 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.060 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.060 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.060 diff --git a/src/us/kbase/typedobj/test/files/DetailedValidation/instance.061 b/service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.061 similarity index 100% rename from src/us/kbase/typedobj/test/files/DetailedValidation/instance.061 rename to service/src/test/resources/us/kbase/test/typedobj/files/DetailedValidation/instance.061 diff --git a/src/us/kbase/typedobj/test/files/IdProcessing/FBA.spec b/service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/FBA.spec similarity index 100% rename from src/us/kbase/typedobj/test/files/IdProcessing/FBA.spec rename to service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/FBA.spec diff --git a/src/us/kbase/typedobj/test/files/IdProcessing/KB.AltIDs.instance.1 b/service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.AltIDs.instance.1 similarity index 100% rename from src/us/kbase/typedobj/test/files/IdProcessing/KB.AltIDs.instance.1 rename to service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.AltIDs.instance.1 diff --git a/src/us/kbase/typedobj/test/files/IdProcessing/KB.AltIDs.instance.1.ids b/service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.AltIDs.instance.1.ids similarity index 100% rename from src/us/kbase/typedobj/test/files/IdProcessing/KB.AltIDs.instance.1.ids rename to service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.AltIDs.instance.1.ids diff --git a/src/us/kbase/typedobj/test/files/IdProcessing/KB.DeepFeatureMap.instance.1 b/service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.DeepFeatureMap.instance.1 similarity index 100% rename from src/us/kbase/typedobj/test/files/IdProcessing/KB.DeepFeatureMap.instance.1 rename to service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.DeepFeatureMap.instance.1 diff --git a/src/us/kbase/typedobj/test/files/IdProcessing/KB.DeepFeatureMap.instance.1.ids b/service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.DeepFeatureMap.instance.1.ids similarity index 100% rename from src/us/kbase/typedobj/test/files/IdProcessing/KB.DeepFeatureMap.instance.1.ids rename to service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.DeepFeatureMap.instance.1.ids diff --git a/src/us/kbase/typedobj/test/files/IdProcessing/KB.FeatureMap.instance.1 b/service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.FeatureMap.instance.1 similarity index 100% rename from src/us/kbase/typedobj/test/files/IdProcessing/KB.FeatureMap.instance.1 rename to service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.FeatureMap.instance.1 diff --git a/src/us/kbase/typedobj/test/files/IdProcessing/KB.FeatureMap.instance.1.ids b/service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.FeatureMap.instance.1.ids similarity index 100% rename from src/us/kbase/typedobj/test/files/IdProcessing/KB.FeatureMap.instance.1.ids rename to service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.FeatureMap.instance.1.ids diff --git a/src/us/kbase/typedobj/test/files/IdProcessing/KB.FeatureMap.instance.2 b/service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.FeatureMap.instance.2 similarity index 100% rename from src/us/kbase/typedobj/test/files/IdProcessing/KB.FeatureMap.instance.2 rename to service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.FeatureMap.instance.2 diff --git a/src/us/kbase/typedobj/test/files/IdProcessing/KB.FeatureMap.instance.2.ids b/service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.FeatureMap.instance.2.ids similarity index 100% rename from src/us/kbase/typedobj/test/files/IdProcessing/KB.FeatureMap.instance.2.ids rename to service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.FeatureMap.instance.2.ids diff --git a/src/us/kbase/typedobj/test/files/IdProcessing/KB.Genome.instance.1 b/service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.Genome.instance.1 similarity index 100% rename from src/us/kbase/typedobj/test/files/IdProcessing/KB.Genome.instance.1 rename to service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.Genome.instance.1 diff --git a/src/us/kbase/typedobj/test/files/IdProcessing/KB.Genome.instance.1.ids b/service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.Genome.instance.1.ids similarity index 100% rename from src/us/kbase/typedobj/test/files/IdProcessing/KB.Genome.instance.1.ids rename to service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.Genome.instance.1.ids diff --git a/src/us/kbase/typedobj/test/files/IdProcessing/KB.Genome.instance.2 b/service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.Genome.instance.2 similarity index 100% rename from src/us/kbase/typedobj/test/files/IdProcessing/KB.Genome.instance.2 rename to service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.Genome.instance.2 diff --git a/src/us/kbase/typedobj/test/files/IdProcessing/KB.Genome.instance.2.ids b/service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.Genome.instance.2.ids similarity index 100% rename from src/us/kbase/typedobj/test/files/IdProcessing/KB.Genome.instance.2.ids rename to service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.Genome.instance.2.ids diff --git a/src/us/kbase/typedobj/test/files/IdProcessing/KB.NestedFeaturesKey.instance.1 b/service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.NestedFeaturesKey.instance.1 similarity index 100% rename from src/us/kbase/typedobj/test/files/IdProcessing/KB.NestedFeaturesKey.instance.1 rename to service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.NestedFeaturesKey.instance.1 diff --git a/src/us/kbase/typedobj/test/files/IdProcessing/KB.NestedFeaturesKey.instance.1.ids b/service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.NestedFeaturesKey.instance.1.ids similarity index 100% rename from src/us/kbase/typedobj/test/files/IdProcessing/KB.NestedFeaturesKey.instance.1.ids rename to service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.NestedFeaturesKey.instance.1.ids diff --git a/src/us/kbase/typedobj/test/files/IdProcessing/KB.NestedFeaturesList.instance.1 b/service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.NestedFeaturesList.instance.1 similarity index 100% rename from src/us/kbase/typedobj/test/files/IdProcessing/KB.NestedFeaturesList.instance.1 rename to service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.NestedFeaturesList.instance.1 diff --git a/src/us/kbase/typedobj/test/files/IdProcessing/KB.NestedFeaturesList.instance.1.ids b/service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.NestedFeaturesList.instance.1.ids similarity index 100% rename from src/us/kbase/typedobj/test/files/IdProcessing/KB.NestedFeaturesList.instance.1.ids rename to service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.NestedFeaturesList.instance.1.ids diff --git a/src/us/kbase/typedobj/test/files/IdProcessing/KB.NestedFeaturesValue.instance.1 b/service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.NestedFeaturesValue.instance.1 similarity index 100% rename from src/us/kbase/typedobj/test/files/IdProcessing/KB.NestedFeaturesValue.instance.1 rename to service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.NestedFeaturesValue.instance.1 diff --git a/src/us/kbase/typedobj/test/files/IdProcessing/KB.NestedFeaturesValue.instance.1.ids b/service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.NestedFeaturesValue.instance.1.ids similarity index 100% rename from src/us/kbase/typedobj/test/files/IdProcessing/KB.NestedFeaturesValue.instance.1.ids rename to service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.NestedFeaturesValue.instance.1.ids diff --git a/src/us/kbase/typedobj/test/files/IdProcessing/KB.WeirdTuple.instance.1 b/service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.WeirdTuple.instance.1 similarity index 100% rename from src/us/kbase/typedobj/test/files/IdProcessing/KB.WeirdTuple.instance.1 rename to service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.WeirdTuple.instance.1 diff --git a/src/us/kbase/typedobj/test/files/IdProcessing/KB.WeirdTuple.instance.1.ids b/service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.WeirdTuple.instance.1.ids similarity index 100% rename from src/us/kbase/typedobj/test/files/IdProcessing/KB.WeirdTuple.instance.1.ids rename to service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.WeirdTuple.instance.1.ids diff --git a/src/us/kbase/typedobj/test/files/IdProcessing/KB.spec b/service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.spec similarity index 100% rename from src/us/kbase/typedobj/test/files/IdProcessing/KB.spec rename to service/src/test/resources/us/kbase/test/typedobj/files/IdProcessing/KB.spec diff --git a/src/us/kbase/typedobj/test/files/MetadataExtraction/KB.FloatStructure.instance.1 b/service/src/test/resources/us/kbase/test/typedobj/files/MetadataExtraction/KB.FloatStructure.instance.1 similarity index 100% rename from src/us/kbase/typedobj/test/files/MetadataExtraction/KB.FloatStructure.instance.1 rename to service/src/test/resources/us/kbase/test/typedobj/files/MetadataExtraction/KB.FloatStructure.instance.1 diff --git a/src/us/kbase/typedobj/test/files/MetadataExtraction/KB.MappingStruct.instance.1 b/service/src/test/resources/us/kbase/test/typedobj/files/MetadataExtraction/KB.MappingStruct.instance.1 similarity index 100% rename from src/us/kbase/typedobj/test/files/MetadataExtraction/KB.MappingStruct.instance.1 rename to service/src/test/resources/us/kbase/test/typedobj/files/MetadataExtraction/KB.MappingStruct.instance.1 diff --git a/src/us/kbase/typedobj/test/files/MetadataExtraction/KB.MetaDataT1.instance.1 b/service/src/test/resources/us/kbase/test/typedobj/files/MetadataExtraction/KB.MetaDataT1.instance.1 similarity index 100% rename from src/us/kbase/typedobj/test/files/MetadataExtraction/KB.MetaDataT1.instance.1 rename to service/src/test/resources/us/kbase/test/typedobj/files/MetadataExtraction/KB.MetaDataT1.instance.1 diff --git a/src/us/kbase/typedobj/test/files/MetadataExtraction/KB.MetaDataT2.instance.1 b/service/src/test/resources/us/kbase/test/typedobj/files/MetadataExtraction/KB.MetaDataT2.instance.1 similarity index 100% rename from src/us/kbase/typedobj/test/files/MetadataExtraction/KB.MetaDataT2.instance.1 rename to service/src/test/resources/us/kbase/test/typedobj/files/MetadataExtraction/KB.MetaDataT2.instance.1 diff --git a/src/us/kbase/typedobj/test/files/MetadataExtraction/KB.MetaDataT3.instance.1 b/service/src/test/resources/us/kbase/test/typedobj/files/MetadataExtraction/KB.MetaDataT3.instance.1 similarity index 100% rename from src/us/kbase/typedobj/test/files/MetadataExtraction/KB.MetaDataT3.instance.1 rename to service/src/test/resources/us/kbase/test/typedobj/files/MetadataExtraction/KB.MetaDataT3.instance.1 diff --git a/src/us/kbase/typedobj/test/files/MetadataExtraction/KB.MetaDataT4.instance.1 b/service/src/test/resources/us/kbase/test/typedobj/files/MetadataExtraction/KB.MetaDataT4.instance.1 similarity index 100% rename from src/us/kbase/typedobj/test/files/MetadataExtraction/KB.MetaDataT4.instance.1 rename to service/src/test/resources/us/kbase/test/typedobj/files/MetadataExtraction/KB.MetaDataT4.instance.1 diff --git a/src/us/kbase/typedobj/test/files/MetadataExtraction/KB.MetaDataT5.instance.1 b/service/src/test/resources/us/kbase/test/typedobj/files/MetadataExtraction/KB.MetaDataT5.instance.1 similarity index 100% rename from src/us/kbase/typedobj/test/files/MetadataExtraction/KB.MetaDataT5.instance.1 rename to service/src/test/resources/us/kbase/test/typedobj/files/MetadataExtraction/KB.MetaDataT5.instance.1 diff --git a/src/us/kbase/typedobj/test/files/MetadataExtraction/KB.MetaDataT6.instance.1 b/service/src/test/resources/us/kbase/test/typedobj/files/MetadataExtraction/KB.MetaDataT6.instance.1 similarity index 100% rename from src/us/kbase/typedobj/test/files/MetadataExtraction/KB.MetaDataT6.instance.1 rename to service/src/test/resources/us/kbase/test/typedobj/files/MetadataExtraction/KB.MetaDataT6.instance.1 diff --git a/src/us/kbase/typedobj/test/files/MetadataExtraction/KB.MetaDataT7.instance.1 b/service/src/test/resources/us/kbase/test/typedobj/files/MetadataExtraction/KB.MetaDataT7.instance.1 similarity index 100% rename from src/us/kbase/typedobj/test/files/MetadataExtraction/KB.MetaDataT7.instance.1 rename to service/src/test/resources/us/kbase/test/typedobj/files/MetadataExtraction/KB.MetaDataT7.instance.1 diff --git a/src/us/kbase/typedobj/test/files/MetadataExtraction/KB.MetaDataT8.instance.1 b/service/src/test/resources/us/kbase/test/typedobj/files/MetadataExtraction/KB.MetaDataT8.instance.1 similarity index 100% rename from src/us/kbase/typedobj/test/files/MetadataExtraction/KB.MetaDataT8.instance.1 rename to service/src/test/resources/us/kbase/test/typedobj/files/MetadataExtraction/KB.MetaDataT8.instance.1 diff --git a/src/us/kbase/typedobj/test/files/MetadataExtraction/KB.MetaDataT9.instance.1 b/service/src/test/resources/us/kbase/test/typedobj/files/MetadataExtraction/KB.MetaDataT9.instance.1 similarity index 100% rename from src/us/kbase/typedobj/test/files/MetadataExtraction/KB.MetaDataT9.instance.1 rename to service/src/test/resources/us/kbase/test/typedobj/files/MetadataExtraction/KB.MetaDataT9.instance.1 diff --git a/src/us/kbase/typedobj/test/files/MetadataExtraction/KB.NoExtractionData.instance.1 b/service/src/test/resources/us/kbase/test/typedobj/files/MetadataExtraction/KB.NoExtractionData.instance.1 similarity index 100% rename from src/us/kbase/typedobj/test/files/MetadataExtraction/KB.NoExtractionData.instance.1 rename to service/src/test/resources/us/kbase/test/typedobj/files/MetadataExtraction/KB.NoExtractionData.instance.1 diff --git a/src/us/kbase/typedobj/test/files/MetadataExtraction/KB.SimpleStructure.instance.1 b/service/src/test/resources/us/kbase/test/typedobj/files/MetadataExtraction/KB.SimpleStructure.instance.1 similarity index 100% rename from src/us/kbase/typedobj/test/files/MetadataExtraction/KB.SimpleStructure.instance.1 rename to service/src/test/resources/us/kbase/test/typedobj/files/MetadataExtraction/KB.SimpleStructure.instance.1 diff --git a/src/us/kbase/typedobj/test/files/MetadataExtraction/KB.SimpleStructure.instance.2 b/service/src/test/resources/us/kbase/test/typedobj/files/MetadataExtraction/KB.SimpleStructure.instance.2 similarity index 100% rename from src/us/kbase/typedobj/test/files/MetadataExtraction/KB.SimpleStructure.instance.2 rename to service/src/test/resources/us/kbase/test/typedobj/files/MetadataExtraction/KB.SimpleStructure.instance.2 diff --git a/src/us/kbase/typedobj/test/files/MetadataExtraction/KB.SimpleStructure.instance.3 b/service/src/test/resources/us/kbase/test/typedobj/files/MetadataExtraction/KB.SimpleStructure.instance.3 similarity index 100% rename from src/us/kbase/typedobj/test/files/MetadataExtraction/KB.SimpleStructure.instance.3 rename to service/src/test/resources/us/kbase/test/typedobj/files/MetadataExtraction/KB.SimpleStructure.instance.3 diff --git a/src/us/kbase/typedobj/test/files/MetadataExtraction/KB.SimpleStructure.instance.4 b/service/src/test/resources/us/kbase/test/typedobj/files/MetadataExtraction/KB.SimpleStructure.instance.4 similarity index 100% rename from src/us/kbase/typedobj/test/files/MetadataExtraction/KB.SimpleStructure.instance.4 rename to service/src/test/resources/us/kbase/test/typedobj/files/MetadataExtraction/KB.SimpleStructure.instance.4 diff --git a/src/us/kbase/typedobj/test/files/MetadataExtraction/KB.SimpleStructure.instance.5 b/service/src/test/resources/us/kbase/test/typedobj/files/MetadataExtraction/KB.SimpleStructure.instance.5 similarity index 100% rename from src/us/kbase/typedobj/test/files/MetadataExtraction/KB.SimpleStructure.instance.5 rename to service/src/test/resources/us/kbase/test/typedobj/files/MetadataExtraction/KB.SimpleStructure.instance.5 diff --git a/src/us/kbase/typedobj/test/files/MetadataExtraction/KB.SimpleStructure.instance.6 b/service/src/test/resources/us/kbase/test/typedobj/files/MetadataExtraction/KB.SimpleStructure.instance.6 similarity index 100% rename from src/us/kbase/typedobj/test/files/MetadataExtraction/KB.SimpleStructure.instance.6 rename to service/src/test/resources/us/kbase/test/typedobj/files/MetadataExtraction/KB.SimpleStructure.instance.6 diff --git a/src/us/kbase/typedobj/test/files/MetadataExtraction/KB.spec b/service/src/test/resources/us/kbase/test/typedobj/files/MetadataExtraction/KB.spec similarity index 100% rename from src/us/kbase/typedobj/test/files/MetadataExtraction/KB.spec rename to service/src/test/resources/us/kbase/test/typedobj/files/MetadataExtraction/KB.spec diff --git a/src/us/kbase/typedobj/test/files/SubdataExtraction/01.ExtractField.instance b/service/src/test/resources/us/kbase/test/typedobj/files/SubdataExtraction/01.ExtractField.instance similarity index 100% rename from src/us/kbase/typedobj/test/files/SubdataExtraction/01.ExtractField.instance rename to service/src/test/resources/us/kbase/test/typedobj/files/SubdataExtraction/01.ExtractField.instance diff --git a/src/us/kbase/typedobj/test/files/SubdataExtraction/02.ExtractNestedField.instance b/service/src/test/resources/us/kbase/test/typedobj/files/SubdataExtraction/02.ExtractNestedField.instance similarity index 100% rename from src/us/kbase/typedobj/test/files/SubdataExtraction/02.ExtractNestedField.instance rename to service/src/test/resources/us/kbase/test/typedobj/files/SubdataExtraction/02.ExtractNestedField.instance diff --git a/src/us/kbase/typedobj/test/files/SubdataExtraction/03.ExtractFieldFail.instance b/service/src/test/resources/us/kbase/test/typedobj/files/SubdataExtraction/03.ExtractFieldFail.instance similarity index 100% rename from src/us/kbase/typedobj/test/files/SubdataExtraction/03.ExtractFieldFail.instance rename to service/src/test/resources/us/kbase/test/typedobj/files/SubdataExtraction/03.ExtractFieldFail.instance diff --git a/src/us/kbase/typedobj/test/files/SubdataExtraction/04.ExtractFromArray.instance b/service/src/test/resources/us/kbase/test/typedobj/files/SubdataExtraction/04.ExtractFromArray.instance similarity index 100% rename from src/us/kbase/typedobj/test/files/SubdataExtraction/04.ExtractFromArray.instance rename to service/src/test/resources/us/kbase/test/typedobj/files/SubdataExtraction/04.ExtractFromArray.instance diff --git a/src/us/kbase/typedobj/test/files/SubdataExtraction/05.ExtractAllFromMap.instance b/service/src/test/resources/us/kbase/test/typedobj/files/SubdataExtraction/05.ExtractAllFromMap.instance similarity index 100% rename from src/us/kbase/typedobj/test/files/SubdataExtraction/05.ExtractAllFromMap.instance rename to service/src/test/resources/us/kbase/test/typedobj/files/SubdataExtraction/05.ExtractAllFromMap.instance diff --git a/src/us/kbase/typedobj/test/files/SubdataExtraction/06.ExtractAllFromList.instance b/service/src/test/resources/us/kbase/test/typedobj/files/SubdataExtraction/06.ExtractAllFromList.instance similarity index 100% rename from src/us/kbase/typedobj/test/files/SubdataExtraction/06.ExtractAllFromList.instance rename to service/src/test/resources/us/kbase/test/typedobj/files/SubdataExtraction/06.ExtractAllFromList.instance diff --git a/src/us/kbase/typedobj/test/files/SubdataExtraction/07.ExtractArrayPosFail.instance b/service/src/test/resources/us/kbase/test/typedobj/files/SubdataExtraction/07.ExtractArrayPosFail.instance similarity index 100% rename from src/us/kbase/typedobj/test/files/SubdataExtraction/07.ExtractArrayPosFail.instance rename to service/src/test/resources/us/kbase/test/typedobj/files/SubdataExtraction/07.ExtractArrayPosFail.instance diff --git a/src/us/kbase/typedobj/test/files/SubdataExtraction/08.ExtractArrayPosFail2.instance b/service/src/test/resources/us/kbase/test/typedobj/files/SubdataExtraction/08.ExtractArrayPosFail2.instance similarity index 100% rename from src/us/kbase/typedobj/test/files/SubdataExtraction/08.ExtractArrayPosFail2.instance rename to service/src/test/resources/us/kbase/test/typedobj/files/SubdataExtraction/08.ExtractArrayPosFail2.instance diff --git a/src/us/kbase/typedobj/test/files/SubdataExtraction/09.ExtractNestedField2.instance b/service/src/test/resources/us/kbase/test/typedobj/files/SubdataExtraction/09.ExtractNestedField2.instance similarity index 100% rename from src/us/kbase/typedobj/test/files/SubdataExtraction/09.ExtractNestedField2.instance rename to service/src/test/resources/us/kbase/test/typedobj/files/SubdataExtraction/09.ExtractNestedField2.instance diff --git a/src/us/kbase/typedobj/test/files/SubdataExtraction/10.ExtractArrayElements.instance b/service/src/test/resources/us/kbase/test/typedobj/files/SubdataExtraction/10.ExtractArrayElements.instance similarity index 100% rename from src/us/kbase/typedobj/test/files/SubdataExtraction/10.ExtractArrayElements.instance rename to service/src/test/resources/us/kbase/test/typedobj/files/SubdataExtraction/10.ExtractArrayElements.instance diff --git a/src/us/kbase/typedobj/test/files/SubdataExtraction/11.ExtractBooleansAndNull.instance b/service/src/test/resources/us/kbase/test/typedobj/files/SubdataExtraction/11.ExtractBooleansAndNull.instance similarity index 100% rename from src/us/kbase/typedobj/test/files/SubdataExtraction/11.ExtractBooleansAndNull.instance rename to service/src/test/resources/us/kbase/test/typedobj/files/SubdataExtraction/11.ExtractBooleansAndNull.instance diff --git a/src/us/kbase/typedobj/test/files/SubdataExtraction/12.ExtractNumbers.instance b/service/src/test/resources/us/kbase/test/typedobj/files/SubdataExtraction/12.ExtractNumbers.instance similarity index 100% rename from src/us/kbase/typedobj/test/files/SubdataExtraction/12.ExtractNumbers.instance rename to service/src/test/resources/us/kbase/test/typedobj/files/SubdataExtraction/12.ExtractNumbers.instance diff --git a/src/us/kbase/typedobj/test/files/SubdataExtraction/13.ExtractWithOptionalFieldsMissing.instance b/service/src/test/resources/us/kbase/test/typedobj/files/SubdataExtraction/13.ExtractWithOptionalFieldsMissing.instance similarity index 100% rename from src/us/kbase/typedobj/test/files/SubdataExtraction/13.ExtractWithOptionalFieldsMissing.instance rename to service/src/test/resources/us/kbase/test/typedobj/files/SubdataExtraction/13.ExtractWithOptionalFieldsMissing.instance diff --git a/src/us/kbase/typedobj/test/files/SubdataExtraction/14.ExtractBadPathFail.instance b/service/src/test/resources/us/kbase/test/typedobj/files/SubdataExtraction/14.ExtractBadPathFail.instance similarity index 100% rename from src/us/kbase/typedobj/test/files/SubdataExtraction/14.ExtractBadPathFail.instance rename to service/src/test/resources/us/kbase/test/typedobj/files/SubdataExtraction/14.ExtractBadPathFail.instance diff --git a/src/us/kbase/typedobj/test/files/SubdataExtraction/15.ExtractPathEscaped.instance b/service/src/test/resources/us/kbase/test/typedobj/files/SubdataExtraction/15.ExtractPathEscaped.instance similarity index 100% rename from src/us/kbase/typedobj/test/files/SubdataExtraction/15.ExtractPathEscaped.instance rename to service/src/test/resources/us/kbase/test/typedobj/files/SubdataExtraction/15.ExtractPathEscaped.instance diff --git a/src/us/kbase/typedobj/test/files/SubdataExtraction/16.ExtractPathEscapedBad.instance b/service/src/test/resources/us/kbase/test/typedobj/files/SubdataExtraction/16.ExtractPathEscapedBad.instance similarity index 100% rename from src/us/kbase/typedobj/test/files/SubdataExtraction/16.ExtractPathEscapedBad.instance rename to service/src/test/resources/us/kbase/test/typedobj/files/SubdataExtraction/16.ExtractPathEscapedBad.instance diff --git a/src/us/kbase/typedobj/test/files/SubdataExtraction/17.ExtractPathEscapedBad2.instance b/service/src/test/resources/us/kbase/test/typedobj/files/SubdataExtraction/17.ExtractPathEscapedBad2.instance similarity index 100% rename from src/us/kbase/typedobj/test/files/SubdataExtraction/17.ExtractPathEscapedBad2.instance rename to service/src/test/resources/us/kbase/test/typedobj/files/SubdataExtraction/17.ExtractPathEscapedBad2.instance diff --git a/src/us/kbase/typedobj/test/files/t4/FBA.spec b/service/src/test/resources/us/kbase/test/typedobj/files/t4/FBA.spec similarity index 100% rename from src/us/kbase/typedobj/test/files/t4/FBA.spec rename to service/src/test/resources/us/kbase/test/typedobj/files/t4/FBA.spec diff --git a/src/us/kbase/typedobj/test/files/t4/KB.spec b/service/src/test/resources/us/kbase/test/typedobj/files/t4/KB.spec similarity index 100% rename from src/us/kbase/typedobj/test/files/t4/KB.spec rename to service/src/test/resources/us/kbase/test/typedobj/files/t4/KB.spec diff --git a/src/us/kbase/workspace/test/docserver/docserverTestFile.html b/service/src/test/resources/us/kbase/test/workspace/docserver/docserverTestFile.html similarity index 100% rename from src/us/kbase/workspace/test/docserver/docserverTestFile.html rename to service/src/test/resources/us/kbase/test/workspace/docserver/docserverTestFile.html diff --git a/src/us/kbase/workspace/test/docserver/fake.css b/service/src/test/resources/us/kbase/test/workspace/docserver/fake.css similarity index 100% rename from src/us/kbase/workspace/test/docserver/fake.css rename to service/src/test/resources/us/kbase/test/workspace/docserver/fake.css diff --git a/src/us/kbase/workspace/test/docserver/fake.gif b/service/src/test/resources/us/kbase/test/workspace/docserver/fake.gif similarity index 100% rename from src/us/kbase/workspace/test/docserver/fake.gif rename to service/src/test/resources/us/kbase/test/workspace/docserver/fake.gif diff --git a/src/us/kbase/workspace/test/docserver/fake.js b/service/src/test/resources/us/kbase/test/workspace/docserver/fake.js similarity index 100% rename from src/us/kbase/workspace/test/docserver/fake.js rename to service/src/test/resources/us/kbase/test/workspace/docserver/fake.js diff --git a/src/us/kbase/workspace/test/docserver/fake.png b/service/src/test/resources/us/kbase/test/workspace/docserver/fake.png similarity index 100% rename from src/us/kbase/workspace/test/docserver/fake.png rename to service/src/test/resources/us/kbase/test/workspace/docserver/fake.png diff --git a/src/us/kbase/workspace/test/docserver/fake.spec b/service/src/test/resources/us/kbase/test/workspace/docserver/fake.spec similarity index 100% rename from src/us/kbase/workspace/test/docserver/fake.spec rename to service/src/test/resources/us/kbase/test/workspace/docserver/fake.spec diff --git a/src/us/kbase/workspace/test/docserver/fake.txt b/service/src/test/resources/us/kbase/test/workspace/docserver/fake.txt similarity index 100% rename from src/us/kbase/workspace/test/docserver/fake.txt rename to service/src/test/resources/us/kbase/test/workspace/docserver/fake.txt diff --git a/src/us/kbase/workspace/test/docserver/fake.weirdsuffix b/service/src/test/resources/us/kbase/test/workspace/docserver/fake.weirdsuffix similarity index 100% rename from src/us/kbase/workspace/test/docserver/fake.weirdsuffix rename to service/src/test/resources/us/kbase/test/workspace/docserver/fake.weirdsuffix diff --git a/src/us/kbase/workspace/test/docserver/files/docserverTestFile2.html b/service/src/test/resources/us/kbase/test/workspace/docserver/files/docserverTestFile2.html similarity index 100% rename from src/us/kbase/workspace/test/docserver/files/docserverTestFile2.html rename to service/src/test/resources/us/kbase/test/workspace/docserver/files/docserverTestFile2.html diff --git a/src/us/kbase/workspace/test/docserver/files/index.html b/service/src/test/resources/us/kbase/test/workspace/docserver/files/index.html similarity index 100% rename from src/us/kbase/workspace/test/docserver/files/index.html rename to service/src/test/resources/us/kbase/test/workspace/docserver/files/index.html diff --git a/src/us/kbase/workspace/test/docserver/index.html b/service/src/test/resources/us/kbase/test/workspace/docserver/index.html similarity index 100% rename from src/us/kbase/workspace/test/docserver/index.html rename to service/src/test/resources/us/kbase/test/workspace/docserver/index.html diff --git a/src/us/kbase/workspace/test/workspace/long_test_get_object_subset.json.gz.properties b/service/src/test/resources/us/kbase/test/workspace/workspace/long_test_get_object_subset.json.gz.properties similarity index 100% rename from src/us/kbase/workspace/test/workspace/long_test_get_object_subset.json.gz.properties rename to service/src/test/resources/us/kbase/test/workspace/workspace/long_test_get_object_subset.json.gz.properties diff --git a/war/web.xml b/service/war/web.xml similarity index 100% rename from war/web.xml rename to service/war/web.xml diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 000000000..8174acd30 --- /dev/null +++ b/settings.gradle @@ -0,0 +1,13 @@ +/* + * This file was generated by the Gradle 'init' task. + * + * The settings file is used to specify which projects to include in your build. + * + * Detailed information about configuring a multi-project build in Gradle can be found + * in the user manual at https://docs.gradle.org/7.4.2/userguide/multi_project_builds.html + * This project uses @Incubating APIs which are subject to change. + */ + +rootProject.name = 'workspace_deluxe' +include 'service' +include 'client' diff --git a/src/us/kbase/common/service/ServiceChecker.java b/src/us/kbase/common/service/ServiceChecker.java deleted file mode 100644 index 6239a1dcf..000000000 --- a/src/us/kbase/common/service/ServiceChecker.java +++ /dev/null @@ -1,121 +0,0 @@ -package us.kbase.common.service; - -import java.io.IOException; -import java.io.InputStream; -import java.net.HttpURLConnection; -import java.net.URL; - -import org.apache.commons.io.IOUtils; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.databind.ObjectMapper; - - -/** Methods for checking on KBase SDK services. - * @author gaprice@lbl.gov - * - */ -public class ServiceChecker { - - public static final String PY_MSG = "Expecting value: line 1 column 1 (char 0)"; - public static final int PY_CODE = -32700; - public static final String JV_PL_MSG = "HTTP GET not allowed."; - public static final int JV_PL_CODE = -32300; - - /** Checks whether the KBase SDK service at the given url is contactable. - * If not, throws an exception. - * @param serviceURL the url of the service. - * @throws ServiceException if the service cannot be contacted or is not a - * KBase SDK service. - */ - public static void checkService(final URL serviceURL) - throws ServiceException { - try { - final HttpURLConnection conn = - (HttpURLConnection) serviceURL.openConnection(); - conn.setRequestMethod("GET"); - conn.setDoOutput(true); - conn.setUseCaches(false); - - final int responseCode = conn.getResponseCode(); - if (responseCode != 500) { - handleNon500(serviceURL, conn, responseCode); - } else { - final RpcResponse r; - try (final InputStream is = conn.getErrorStream()) { - r = new ObjectMapper() - .readValue(is, RpcResponse.class); - } - conn.disconnect(); - //TODO TEST mock up a test service for the next two checks at some point - if (r.error == null) { - throw new ServiceException(String.format( - "The service at %s is not a KBase SDK service: " + - "no error field in RPC response as expected", - serviceURL)); - } - final String msg = r.error.message; - final int code = r.error.code; - if (!(PY_MSG.equals(msg) && PY_CODE == code) && - !(JV_PL_MSG.equals(msg) && JV_PL_CODE == code)) { - throw new ServiceException(String.format( - "The JSONRPC service at %s is not a KBase SDK " + - "service. Code: %s, message: %s", - serviceURL, code, msg)); - } - // service is ok, nothing to do - } - } catch (IOException e) { - throw new ServiceException(String.format( - "Could not contact the service at URL %s: %s", - serviceURL, e.getMessage()), e); - } - } - - private static void handleNon500( - final URL serviceURL, - final HttpURLConnection conn, - final int responseCode) - throws IOException, ServiceException { - final String error; - try (final InputStream es = conn.getInputStream()) { - error = IOUtils.toString(es, "UTF-8"); - } - conn.disconnect(); - throw new ServiceException(String.format( - "URL %s does not point to a KBase SDK generated " + - "service. Code: %s, message: %s, content: %s", - serviceURL, responseCode, - conn.getResponseMessage(), - error.length() >= 1000 ? error.substring(0, 1000) : - error)); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - private static class RpcError { - - public String message; - public int code; - } - - @JsonIgnoreProperties(ignoreUnknown = true) - private static class RpcResponse { - public RpcError error; - } - - @SuppressWarnings("serial") - public static class ServiceException extends Exception { - - private ServiceException(String message, Throwable cause) { - super(message, cause); - } - - private ServiceException(String message) { - super(message); - } - } - - public static void main(String[] args) throws Exception { - checkService(new URL("http://the-internet.herokuapp.com/status_codes/500")); - } -} diff --git a/src/us/kbase/common/test/service/ServiceCheckerTest.java b/src/us/kbase/common/test/service/ServiceCheckerTest.java deleted file mode 100644 index 86a30d084..000000000 --- a/src/us/kbase/common/test/service/ServiceCheckerTest.java +++ /dev/null @@ -1,117 +0,0 @@ -package us.kbase.common.test.service; - -import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.fail; - -import java.net.MalformedURLException; -import java.net.URL; -import java.util.HashMap; -import java.util.Map; - -import org.junit.BeforeClass; -import org.junit.Test; - -import us.kbase.common.service.ServiceChecker; -import us.kbase.common.service.ServiceChecker.ServiceException; - -public class ServiceCheckerTest { - - private static final String KBASE_ENV = "https://ci.kbase.us"; // "https://kbase.us/" - - public static class TestSpec { - public final String err; - public final URL url; - private TestSpec(String err, String url) throws MalformedURLException { - super(); - this.err = err; - this.url = new URL(url); - } - } - - public static Map TESTS = new HashMap<>(); - - @BeforeClass - public static void beforeClass() throws Exception { - TESTS.put("Perl", new TestSpec( - null, KBASE_ENV + "/services/handle_service")); - TESTS.put("Python", new TestSpec( - null, KBASE_ENV + "/services/catalog")); - TESTS.put("Java", new TestSpec( - null, KBASE_ENV + "/services/ws")); - TESTS.put("HTTP", new TestSpec( - null, "http://dev03.berkeley.kbase.us:7058")); - TESTS.put("500", new TestSpec( - "Could not contact the service at URL http://the-internet." + - "herokuapp.com/status_codes/500: Unexpected character ('<' " + - "(code 60)):", - "http://the-internet.herokuapp.com/status_codes/500")); - TESTS.put("200", new TestSpec( - "URL http://google.com does not point to a KBase SDK " + - "generated service. Code: 200, message: OK, content: " + - " adminRoles) - throws Exception { - checkExe(blobstoreExe, "blobstore"); - this.tempDir = makeTempDirs(rootTempDir, "BlobstoreController-", Collections.emptyList()); - this.port = findFreePort(); - - final File bsIniFile = createBlobstoreDeployCfg( - mongohost, - mongoDBname, - s3Host, - s3Bucket, - s3AccessKey, - s3AccessSecret, - s3Region, - kbaseAuthURL, - adminRoles - ); - - this.logfile = tempDir.resolve("blobstore.log"); - - ProcessBuilder servpb = new ProcessBuilder(blobstoreExe, "--conf", bsIniFile.toString()) - .redirectErrorStream(true) - .redirectOutput(logfile.toFile()); - - this.blobstore = servpb.start(); - Thread.sleep(1000); //wait for server to start - } - - private File createBlobstoreDeployCfg( - final String mongohost, - final String mongoDBname, - final String s3Host, - final String s3Bucket, - final String s3AccessKey, - final String s3AccessSecret, - final String s3Region, - final URL kbaseAuthURL, - final List adminRoles) - throws IOException { - final File iniFile = tempDir.resolve("blobstore.cfg").toFile(); - final Ini ini = new Ini(); - final Section ss = ini.add(BLOBSTORE_CFG_SECTION); - ss.add("host", "localhost:" + port); - - ss.add("kbase-auth-url", kbaseAuthURL.toString()); - ss.add("kbase-auth-admin-roles", String.join(", ", adminRoles)); - - ss.add("mongodb-host", mongohost); - ss.add("mongodb-database", mongoDBname); - - ss.add("s3-host", s3Host); - ss.add("s3-bucket", s3Bucket); - ss.add("s3-access-key", s3AccessKey); - ss.add("s3-access-secret", s3AccessSecret); - ss.add("s3-region", s3Region); - ss.add("s3-disable-ssl", "true"); - - ini.store(iniFile); - return iniFile; - } - - /** Get the blobstore port. - * @return the port. - */ - public int getPort() { - return port; - } - - /** Get the directory in which the blobstore is storing temporary files. - * @return the temporary directory. - */ - public Path getTempDir() { - return tempDir; - } - - /** Shut down the blob store. - * @param deleteTempFiles true to delete any temporary files. - * @throws IOException if an IO error occurs. - */ - public void destroy(final boolean deleteTempFiles) throws IOException { - destroy(deleteTempFiles, false); - } - - /** Shut down the blob store. - * @param deleteTempFiles true to delete any temporary files. - * @param dumpLogToStdOut print any blobstore logs to standard out. - * @throws IOException if an IO error occurs. - */ - public void destroy(final boolean deleteTempFiles, final boolean dumpLogToStdOut) - throws IOException { - if (blobstore != null) { - blobstore.destroy(); - } - if (dumpLogToStdOut) { - try (final BufferedReader is = Files.newBufferedReader(logfile)) { - is.lines().forEach(l -> System.out.println(l)); - } - } - if (tempDir != null && deleteTempFiles) { - FileUtils.deleteDirectory(tempDir.toFile()); - } - } -} \ No newline at end of file diff --git a/src/us/kbase/workspace/test/controllers/minio/MinioController.java b/src/us/kbase/workspace/test/controllers/minio/MinioController.java deleted file mode 100644 index 0a57f983c..000000000 --- a/src/us/kbase/workspace/test/controllers/minio/MinioController.java +++ /dev/null @@ -1,98 +0,0 @@ -package us.kbase.workspace.test.controllers.minio; - -import static us.kbase.common.test.controllers.ControllerCommon.checkExe; -import static us.kbase.common.test.controllers.ControllerCommon.findFreePort; -import static us.kbase.common.test.controllers.ControllerCommon.makeTempDirs; - -import java.io.BufferedReader; -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.Arrays; -import java.util.Scanner; - -import org.apache.commons.io.FileUtils; - -/** Q&D Utility to run a Minio server for the purposes of testing from - * Java. Always run with the --compat flag. - * @author gaprice@lbl.gov - * - */ -public class MinioController { - - private final Path tempDir; - - private final Process minio; - private final int port; - private final Path logfile; - - public MinioController( - final String minioExe, - final String s3AccessKey, - final String s3AccessSecret, - final Path rootTempDir) - throws Exception { - tempDir = makeTempDirs(rootTempDir, "MinioController-", Arrays.asList("data")); - port = findFreePort(); - - checkExe(minioExe, "minio server"); - - logfile = tempDir.resolve("minio_server.log"); - ProcessBuilder servpb = new ProcessBuilder( - minioExe, - "server", - "--compat", - "--address", "localhost:" + port, - tempDir.resolve("data").toString()) - .redirectErrorStream(true) - .redirectOutput(logfile.toFile()); - - servpb.environment().put("MINIO_ACCESS_KEY", s3AccessKey); - servpb.environment().put("MINIO_SECRET_KEY", s3AccessSecret); - minio = servpb.start(); - Thread.sleep(1000); //wait for server to start - } - - public int getServerPort() { - return port; - } - - public Path getTempDir() { - return tempDir; - } - - public void destroy(boolean deleteTempFiles) throws IOException { - destroy(deleteTempFiles, false); - } - - public void destroy(boolean deleteTempFiles, boolean dumpLogToStdOut) throws IOException { - if (minio != null) { - minio.destroy(); - } - if (dumpLogToStdOut) { - try (final BufferedReader is = Files.newBufferedReader(logfile)) { - is.lines().forEach(l -> System.out.println(l)); - } - } - if (tempDir != null && deleteTempFiles) { - FileUtils.deleteDirectory(tempDir.toFile()); - } - } - - public static void main(String[] args) throws Exception { - MinioController ac = new MinioController( - "Minio", - "foobar", - "Wheewhoowhump", - Paths.get("minio_temp_dir")); - System.out.println(ac.getServerPort()); - Scanner reader = new Scanner(System.in); - System.out.println("any char to shut down"); - //get user input for a - reader.next(); - ac.destroy(false); - reader.close(); - } - -} diff --git a/test.cfg.example b/test.cfg.example index a66c1312f..ea4f09a66 100644 --- a/test.cfg.example +++ b/test.cfg.example @@ -2,10 +2,6 @@ [Workspacetest] -# The path to the jars dir inside the jars repo, e.g. -# [path to jars repo]/lib/jars -test.jars.dir = - # Minio exe file location test.minio.exe = minio diff --git a/test/workspace_container_test.py b/test/workspace_container_test.py index d53a15ca3..84ef7f9e8 100644 --- a/test/workspace_container_test.py +++ b/test/workspace_container_test.py @@ -17,7 +17,7 @@ """ -WORKSPACE_VERSION = "0.14.3" +WORKSPACE_VERSION = "0.15.0" AUTH_URL = "http://localhost:8080" WS_URL = "http://localhost:7058" diff --git a/workspace.spec b/workspace.spec index bb2a5d445..287d9dea3 100644 --- a/workspace.spec +++ b/workspace.spec @@ -980,7 +980,7 @@ module Workspace { UnspecifiedObject data - The object's data. object_metadata metadata - Metadata for object retrieved/ - @deprecated Workspaces.ObjectData + @deprecated Workspace.ObjectData */ typedef structure { UnspecifiedObject data;